@miconda commented on this pull request.
In src/modules/janssonrpcc/janssonrpc_connect.c:
> @@ -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, view it on GitHub, or mute the thread.