-call client last, so that if the client calls disconnect, it does not mess us up
authorChristian Grothoff <christian@grothoff.org>
Wed, 25 Jan 2012 21:41:54 +0000 (21:41 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 25 Jan 2012 21:41:54 +0000 (21:41 +0000)
src/vpn/vpn_api.c

index 81282960ece83000b5a8d90c0097eec8942881f3..31d17f8c9e462e63526b318006b539ac9d273ea5 100644 (file)
@@ -219,6 +219,9 @@ receive_response (void *cls,
     reconnect (vh);
     return;
   }  
+  GNUNET_CLIENT_receive (vh->client,
+                        &receive_response, vh,
+                        GNUNET_TIME_UNIT_FOREVER_REL);      
   for (rr = vh->rr_head; NULL != rr; rr = rr->next)
   {
     if (rr->request_id == rm->request_id)
@@ -233,9 +236,6 @@ receive_response (void *cls,
       break;
     }
   }
-  GNUNET_CLIENT_receive (vh->client,
-                        &receive_response, vh,
-                        GNUNET_TIME_UNIT_FOREVER_REL);      
 }