woops, we need a valid peer for telling who peer is
authorChristian Thaeter <ct@pipapo.org>
Mon, 5 Nov 2007 07:38:21 +0000 (08:38 +0100)
committerChristian Thaeter <ct@pipapo.org>
Mon, 5 Nov 2007 07:38:53 +0000 (08:38 +0100)
src/rxpd_connection.c

index c6cc816..0c6cbcc 100644 (file)
@@ -65,8 +65,6 @@ rxpd_connection_cleanup (void* ptr)
 {
   struct rxpd_connection* self = ptr;
   llist_unlink (&self->node);
-  close (self->fd);
-  self->fd = -1;
 
   char buf[512];
   *buf = '\0';
@@ -75,6 +73,8 @@ rxpd_connection_cleanup (void* ptr)
       rxpd_log (NULL, LOG_DEBUG, "connection %s terminated\n", buf);
     }
 
+  close (self->fd);
+  self->fd = -1;
   rxpd_connection_delete (self);
 }