libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] [PATCH]: MHD_connection_update_event_loop_info sends


From: Vitaliy T
Subject: Re: [libmicrohttpd] [PATCH]: MHD_connection_update_event_loop_info sends INTERNAL_ERROR for suspended connections
Date: Wed, 15 Mar 2017 16:00:42 +0300

Another version, variant for MHD_connection_handle_idle().

Short description:
Inside the function MHD_connection_handle_idle() between the loop and
later calling MHD_connection_update_event_loop_info() a lot things may
happen.

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index f192a1bb..ab542913 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3211,6 +3211,10 @@ MHD_connection_handle_idle (struct
MHD_Connection *connection)
         }
       break;
     }
+  if (connection->suspended) {
+      connection->in_idle = false;
+      return MHD_YES;
+  }
   timeout = connection->connection_timeout;
   if ( (0 != timeout) &&
        (timeout <= (MHD_monotonic_sec_counter() - connection->last_activity)) )


Can't say which version is better, good, bad, either valid or invalid.
I hope the bug will be fixed somehow.
Thanks.

-- 
With Best Regards,
Vitaliy V. Tokarev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]