You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good day.
In the GroupSock library closing of a socket is not fully correct. Closing there is just uses CloseSocket (aka closesocket). When the input or output buffer is not empty, socket handle wil not be freed. It's ok, when the application just opens a few sessions and then exits, but when application is working long time and often connects and reconnects, there will be the situation when handle amount (can be changed with ulimit) will run over. To avoid that it is necessary to call shutdown(socket, SHUT_RDWR) first, to clean up both buffers and to stop receiving any data, then CloseSocket(socket) will definitely close it and file handle will be released.
The text was updated successfully, but these errors were encountered:
Good day.
In the GroupSock library closing of a socket is not fully correct. Closing there is just uses CloseSocket (aka closesocket). When the input or output buffer is not empty, socket handle wil not be freed. It's ok, when the application just opens a few sessions and then exits, but when application is working long time and often connects and reconnects, there will be the situation when handle amount (can be changed with ulimit) will run over. To avoid that it is necessary to call shutdown(socket, SHUT_RDWR) first, to clean up both buffers and to stop receiving any data, then CloseSocket(socket) will definitely close it and file handle will be released.
The text was updated successfully, but these errors were encountered: