iilyak commented on PR #4729: URL: https://github.com/apache/couchdb/pull/4729#issuecomment-1688690143
> I managed to find a way to seemingly detect the connection state change after the local client (curl) disconnects by querying the equivalent of `getsockopt(fd(), IPPROTO_TCP, TCP_CONNECTION_INFO, &info, &info_size)` > > ``` > (node1@127.0.0.1)22> rp(inet:getopts(#Port<0.24>, [{raw, 6, 262, 1000}])). > {ok,[{raw,6,262, > <<4,6,6,0,7,0,0,0,0,0,0,0,0,0,0,0,204,63,0,0,0,192,255, > 63,18,0,2,0,0,57,6,0,0,0,0,0,88,58,6,0,1,0,0,0,1,0,0, > 0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,177,1,0,0,0,0,0,0, > 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,148,0,0,0,0,0,0,0,0, > 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>}]} > ok > ``` This is nice. If we can cleanly encapsulate it in mochiweb then it might be a viable option. I am planing to look into mochiweb code to see if it is doable. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org