mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-22 05:02:00 +00:00
iTry to detect closed sockets earlier.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24084 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f8291f571d
commit
ac64c81310
2 changed files with 13 additions and 0 deletions
|
@ -1199,6 +1199,17 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
port = @"80";
|
||||
}
|
||||
|
||||
/* An existing socket with keepalive may have been closed by the other
|
||||
* end ... run the loop once (immediately returning) to try to detect it.
|
||||
*/
|
||||
if (sock != nil)
|
||||
{
|
||||
NSRunLoop *loop = [NSRunLoop currentRunLoop];
|
||||
|
||||
[loop acceptInputForMode: NSDefaultRunLoopMode
|
||||
beforeDate: nil];
|
||||
}
|
||||
|
||||
if (sock == nil)
|
||||
{
|
||||
keepalive = NO; // New connection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue