miconda commented on this pull request.
@@ -79,6 +82,11 @@ void
force_disconnect(jsonrpc_server_t* server)
server->buffer = NULL;
server->status = JSONRPC_SERVER_DISCONNECTED;
+ if (server->keep_alive_socket_fd) {
+ INFO("closing socket");
+ close(server->keep_alive_socket_fd);
+ server->keep_alive_socket_fd = -1;
+ }
I think that the condition above should be:
```
if (server->keep_alive_socket_fd>=0) {
```
otherwise it will be true after you close the socket and set the value of the field to -1.
So next time you will close fd -1, which is invalid.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1808#pullrequestreview-191765113