Code

network plugin: Flush the buffer in the `shutdown' function..
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 12 Oct 2007 16:20:25 +0000 (18:20 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 12 Oct 2007 16:20:25 +0000 (18:20 +0200)
src/network.c

index 84e77733da9e830e3aabda39171fdcec75194ba2..5ae36c10bb5edef934b936c75c95f8c2c860168c 100644 (file)
@@ -1277,8 +1277,6 @@ static int network_config (const char *key, const char *val)
 
 static int network_shutdown (void)
 {
-       DEBUG ("Shutting down.");
-
        listen_loop++;
 
        if (listen_thread != (pthread_t) 0)
@@ -1288,7 +1286,8 @@ static int network_shutdown (void)
                listen_thread = (pthread_t) 0;
        }
 
-       listen_thread = 0;
+       if (send_buffer_fill > 0)
+               flush_buffer ();
 
        if (cache_tree != NULL)
        {