]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/sslproc.c
Rework remote rehash messages to apply to all server notices during rehash.
[irc/rqf/shadowircd.git] / src / sslproc.c
index 73c28b4196c7ed8829266d85b2a5fab16760d298..e525af81d9e8b64e6484c61a14bdac45e27823da 100644 (file)
@@ -336,7 +336,7 @@ ssl_process_zipstats(ssl_ctl_t * ctl, ssl_ctl_buf_t * ctl_buf)
        struct Client *server;
        struct ZipStats *zips;
        int parc;
-       char *parv[6];
+       char *parv[7];
        parc = rb_string_to_array(ctl_buf->buf, parv, 6);
        server = find_server(NULL, parv[1]);
        if(server == NULL || server->localClient == NULL || !IsCapable(server, CAP_ZIP))
@@ -377,6 +377,14 @@ ssl_process_dead_fd(ssl_ctl_t * ctl, ssl_ctl_buf_t * ctl_buf)
        client_p = find_cli_fd_hash(fd);
        if(client_p == NULL)
                return;
+       if(IsAnyServer(client_p) || IsRegistered(client_p))
+       {
+               /* read any last moment ERROR, QUIT or the like -- jilles */
+               if (!strcmp(reason, "Remote host closed the connection"))
+                       read_packet(client_p->localClient->F, client_p);
+               if (IsAnyDead(client_p))
+                       return;
+       }
        if(IsAnyServer(client_p))
        {
                sendto_realops_snomask(SNO_GENERAL, is_remote_connect(client_p) && !IsServer(client_p) ? L_NETWIDE : L_ALL, "ssld error for %s: %s", client_p->name, reason);