Browse Source

* Ported [2499] to 1.2.9

svn: 2610
Bryan Drewery 20 years ago
parent
commit
fbbbb265f6
2 changed files with 3 additions and 1 deletions
  1. 1 0
      doc/UPDATES
  2. 2 1
      src/mod/share.mod/share.c

+ 1 - 0
doc/UPDATES

@@ -38,6 +38,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed a socket protocol error.
 * Fixed a small error in help file for 'whom'.
 * Removed some legacy code from failed relays that attempts to connect to port+1, port+2, port+3... (might fix #177)
+* Fixed an invalid killsock error in sharing.
 
 1.2.8
 * Fixed [bot]* cmds depending on case of botnicks.

+ 2 - 1
src/mod/share.mod/share.c

@@ -906,7 +906,8 @@ share_ufsend(int idx, char *par)
 #endif /* USE_IPV6 */
     if (sock < 0 || open_telnet_dcc(sock, ip, port) < 0) {
       fclose(f);
-      killsock(sock);
+      if (sock != -1)
+        killsock(sock);
       putlog(LOG_BOTS, "@", "Asynchronous connection failed!");
       dprintf(idx, "s e Can't connect to you!\n");
       zapfbot(idx);