about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/tcp.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c48121e5..6c5a52d9e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-05  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
+
+	* 17294: Src/Modules/tcp.c: remove session even if closing fd
+	failed; remove builtin from hash table when unloading module.
+
 2002-06-05  Peter Stephenson  <pws@csr.com>
 
 	* 17292: Src/builtin.c: shut up compiler if no OPEN_MEMSTREAM.
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index 25a88ff76..5dc00d0bc 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -299,10 +299,7 @@ tcp_close(Tcp_session sess)
 	{
 	    err = close(sess->fd);
 	    if (err)
-	    {
 		zwarn("connection close failed: %e", NULL, errno);
-		return -1;
-	    }
 	}
 	zts_delete(sess);
 	return 0;
@@ -701,6 +698,7 @@ int
 cleanup_(Module m)
 {
     tcp_cleanup();
+    deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
     freelinklist(ztcp_sessions, (FreeFunc) ztcp_free_session);
     return 0;
 }