Check-in Number:
|
1205 | |
Date: |
2001-Oct-24 13:43:28 (local)
2001-Oct-24 11:43:28 (UTC) |
User: | rse |
Branch: | |
Comment: |
fix socket descriptor handling in case of connect errors |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/sa/sa.c 1.34 -> 1.35
--- sa.c 2001/10/24 11:23:17 1.34
+++ sa.c 2001/10/24 11:43:28 1.35
@@ -1149,6 +1149,7 @@
}
else if (n == 0) {
close(sa->fdSocket); /* stop TCP three-way handshake */
+ sa->fdSocket = -1;
rv = SA_ERR_TMT;
goto done;
}
@@ -1166,6 +1167,7 @@
/* optionally set errno */
if (error != 0) {
close(sa->fdSocket); /* just in case */
+ sa->fdSocket = -1;
errno = error;
rv = SA_ERR_SYS;
}
|
|