Yep, you are right, this patch is more correct. "suspended" should be set by user callbacks called in this function, so code must check for suspended before doing other thing.
-- Best Wishes, Evgeny Grin On 15.03.2017 16:00, Vitaliy T wrote: > 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. >