summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjingham <jingham>2000-02-10 08:41:46 (GMT)
committerjingham <jingham>2000-02-10 08:41:46 (GMT)
commitaf20e1900d15f8cfda66b96bce71b84375b35a4c (patch)
tree24265052ba9b0786264e030ab18454c440f08b00
parente1bbc0e3739eeb20a4cc9e384890acce1edd8f9a (diff)
downloadtcl-af20e1900d15f8cfda66b96bce71b84375b35a4c.zip
tcl-af20e1900d15f8cfda66b96bce71b84375b35a4c.tar.gz
tcl-af20e1900d15f8cfda66b96bce71b84375b35a4c.tar.bz2
Don't panic when you can't close an async socket on error. It seems to be benign to just pass out the error, which is a better solution in the long term.
-rw-r--r--mac/tclMacSock.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/mac/tclMacSock.c b/mac/tclMacSock.c
index ff627ec..f1b1a1c 100644
--- a/mac/tclMacSock.c
+++ b/mac/tclMacSock.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacSock.c,v 1.5 1999/08/10 04:21:55 jingham Exp $
+ * RCS: @(#) $Id: tclMacSock.c,v 1.6 2000/02/10 08:41:46 jingham Exp $
*/
#include "tclInt.h"
@@ -760,16 +760,12 @@ TcpClose(
closePB.tcpStream = tcpStream;
closePB.ioCompletion = NULL;
err = PBControlSync((ParmBlkPtr) &closePB);
- if (err != noErr) {
- panic("error closing async connect socket");
- }
- statePtr->flags |= TCP_RELEASE;
+ if (err == noErr) {
+ statePtr->flags |= TCP_RELEASE;
- InitMacTCPParamBlock(&statePtr->pb, TCPRelease);
- statePtr->pb.tcpStream = statePtr->tcpStream;
- err = PBControlSync((ParmBlkPtr) &statePtr->pb);
- if (err != noErr) {
- panic("error releasing async connect socket");
+ InitMacTCPParamBlock(&statePtr->pb, TCPRelease);
+ statePtr->pb.tcpStream = statePtr->tcpStream;
+ err = PBControlSync((ParmBlkPtr) &statePtr->pb);
}
/*
@@ -779,7 +775,7 @@ TcpClose(
ckfree((char *) statePtr->pb.csParam.create.rcvBuff);
FreeSocketInfo(statePtr);
- return 0;
+ return err;
}
/*