when shutting down, also tell the Lobby
authorClaus Gittinger <cg@exept.de>
Fri, 30 Aug 1996 00:41:19 +0200
changeset 429 197dee9342a3
parent 428 3cdcd0597bf0
child 430 12d736316f69
when shutting down, also tell the Lobby
Socket.st
--- a/Socket.st	Fri Aug 23 10:30:04 1996 +0200
+++ b/Socket.st	Fri Aug 30 00:41:19 1996 +0200
@@ -1986,23 +1986,26 @@
 shutDown 
     "shutDown without flushing "
 
-%{  /* NOCONTEXT */
+    filePointer isNil ifTrue:[^ self].
+    Lobby unregister:self.
+
+%{
 #ifndef NO_SOCKET
 
     OBJ fp;
 
     fp = __INST(filePointer);
     if (fp != nil) {
-	FILE *f;
-	int fd;
+        FILE *f;
+        int fd;
 
-	__INST(filePointer) = nil;
-	f = __FILEVal(fp);
-	fd = fileno(f);
-	__BEGIN_INTERRUPTABLE__
-	shutdown(fd, 2);
-	close(fd);
-	__END_INTERRUPTABLE__
+        __INST(filePointer) = nil;
+        f = __FILEVal(fp);
+        fd = fileno(f);
+        __BEGIN_INTERRUPTABLE__
+        shutdown(fd, 2);
+        close(fd);
+        __END_INTERRUPTABLE__
     }
 #endif
 %}
@@ -2555,5 +2558,5 @@
 !Socket  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.67 1996-07-27 09:05:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.68 1996-08-29 22:41:19 cg Exp $'
 ! !