info: drain the request when there are too many requests in flight
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 7 Dec 2016 22:24:15 +0000 (23:24 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 4 Jan 2017 08:47:10 +0000 (09:47 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/info/olsrd_info.c

index 6f0affc..b26b043 100644 (file)
@@ -683,6 +683,7 @@ static void ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int
 
   if (outbuffer.count >= MAX_CLIENTS) {
     /* limit the number of replies that are in-flight */
+    drain_request(ipc_connection);
     send_status_no_retries(req, ipc_connection, INFO_HTTP_SERVICE_UNAVAILABLE);
     return;
   }