mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 16:50:42 +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
|
@ -2,6 +2,8 @@
|
|||
|
||||
* Source/NSCalendarDate.m: Fix a few string parsing errors (check that
|
||||
string matches format in MacOS-X compatible manner).
|
||||
* Source/GSHTTPURLHandle.m: try to detect socket being closed by
|
||||
remote end of connection before we try writing to it.
|
||||
|
||||
2006-11-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue