[Log4cplus-devel] [ log4cplus-Bugs-3585765 ] ServerSocket::accept doesn't abort when the socket is
Logging Framework for C++
Brought to you by:
wilx
From: SourceForge.net <no...@so...> - 2012-11-19 13:16:42
|
Bugs item #3585765, was opened at 2012-11-09 06:27 Message generated for change (Comment added) made by wilx You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429073&aid=3585765&group_id=40830 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: v1.1.x Status: Open Resolution: None Priority: 5 Private: No Submitted By: Chris Steenwyk (csteenwyk) Assigned to: Václav Zeman (wilx) Summary: ServerSocket::accept doesn't abort when the socket is closed Initial Comment: When working to create a logging server class, I created a thread that calls ServerSocket::accept. This function uses the winsock accept function which blocks. If this is blocking, the close command on the socket waits for it to return, so the thread would hang causing the app to not close in windows. I updated the socket-win32.cxx to use the select function in a loop to prevent this issue. See included diff. ---------------------------------------------------------------------- >Comment By: Václav Zeman (wilx) Date: 2012-11-19 05:16 Message: I would rather not any select() returned -1 as closed socket. This could hide some actual errors. Instead of your patch I am attaching a different one based on WSAEventSelect(). It is completely untested but it compiles. Do you think you could test it? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429073&aid=3585765&group_id=40830 |