wrong place for assertion
authorChristian Grothoff <christian@grothoff.org>
Thu, 1 Oct 2009 22:25:04 +0000 (22:25 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 1 Oct 2009 22:25:04 +0000 (22:25 +0000)
src/util/connection.c

index c47aec182386f4f4e26f6a0e3af50c517d435910..a332556a536d60224fe524965f092f66ec124ad3 100644 (file)
@@ -1310,7 +1310,6 @@ transmit_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   GNUNET_assert (sock->write_task != GNUNET_SCHEDULER_NO_TASK);
   sock->write_task = GNUNET_SCHEDULER_NO_TASK;
-  GNUNET_assert (NULL != sock->sock);
   if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT))
     {
 #if DEBUG_CONNECTION
@@ -1323,6 +1322,7 @@ transmit_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       notify (sock->nth.notify_ready_cls, 0, NULL);
       return;
     }
+  GNUNET_assert (NULL != sock->sock);
   if (! GNUNET_NETWORK_fdset_isset (tc->write_ready, 
                                    sock->sock))
     {