* sleep after nuking the server
authorWilfried Göesgens <willi@citadel.org>
Mon, 17 Sep 2007 21:57:36 +0000 (21:57 +0000)
committerWilfried Göesgens <willi@citadel.org>
Mon, 17 Sep 2007 21:57:36 +0000 (21:57 +0000)
* print backtrace if the server connection goes dead.

webcit/mainmenu.c
webcit/tcp_sockets.c
webcit/webserver.h

index 41c7af045425790a44b7cf52e8640cf6e6dfb6ae..4609b263789a283da7a04f1afd5b5cdfb9766ef7 100644 (file)
@@ -356,13 +356,16 @@ void display_shutdown(void)
                else {
                        wprintf("<html>\n"
                                "<head>\n"
-                               "<meta http-equiv=\"refresh\" content=\"5; URL=knrooms\"/>\n"
+                               "<meta http-equiv=\"refresh\" content=\"15; URL=knrooms\"/>\n"
                                "</head>\n"
                                "<body bgcolor=\"#FFFFFF\">\n"
                                "Please wait while the citadel server is restarted... "
                                "</body>\n</html>\n"
                                );
                }
+               sleeeeeeeeeep(10);
+               serv_printf("NOOP");
+               serv_printf("NOOP");
        }
        else if (!strcmp(when, "page")) {
                char *message;
index ed5ab54af16bd3dc8a0a3742154a19ad554807a3..a348f1e0eca4b089b9e6f29ca98e2abf7199e776 100644 (file)
@@ -133,6 +133,7 @@ void serv_read(char *buf, int bytes)
                if (rlen < 1) {
                        lprintf(1, "Server connection broken: %s\n",
                                strerror(errno));
+                       wc_backtrace();
                        close(WC->serv_sock);
                        WC->serv_sock = (-1);
                        WC->connected = 0;
index 503391411a863c16511a303bcf42ff63749c04f2..47bb4f860dc2009a946cbbd454dcdd2d25ddcc71 100644 (file)
@@ -10,3 +10,4 @@ int client_read(int sock, char *buf, int bytes);
 int client_read_to(int sock, char *buf, int bytes, int timeout);
 ssize_t client_write(const void *buf, size_t count);
 int lprintf(int loglevel, const char *format, ...);
+void wc_backtrace(void);