mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
tidied shutdown of sockets
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24475 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1412d0a1ab
commit
3475a3569d
2 changed files with 4 additions and 3 deletions
|
@ -3,6 +3,8 @@
|
|||
* configure.ac: minor tweak to avoid possible inconsistency in
|
||||
environment used to check LLOGN_MAX and LONG_LONG_MAX presence.
|
||||
* configure: regenerate
|
||||
* Source/GSHTTPURLHandle.m: always remove self as observer for all
|
||||
notifications on a socket when closing it.
|
||||
|
||||
2007-02-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -554,9 +554,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
NSStringFromSelector(_cmd), keepalive?"K":"",
|
||||
[d length], [d length], [d bytes]);
|
||||
}
|
||||
[nc removeObserver: self
|
||||
name: NSFileHandleReadCompletionNotification
|
||||
object: sock];
|
||||
[nc removeObserver: self name: nil object: sock];
|
||||
[sock closeFile];
|
||||
DESTROY(sock);
|
||||
}
|
||||
|
@ -615,6 +613,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
val = [[document headerNamed: @"connection"] value];
|
||||
if (ver < 1.1 || (val != nil && [val isEqual: @"close"] == YES))
|
||||
{
|
||||
[nc removeObserver: self name: nil object: sock];
|
||||
[sock closeFile];
|
||||
DESTROY(sock);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue