[sr-dev] [kamailio/kamailio] janssonrpcc: add new parameter "keep_alive" (#1808)

Daniel-Constantin Mierla notifications at github.com
Fri Jan 11 18:28:06 CET 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190111/4da637a0/attachment.html>


More information about the sr-dev mailing list