瀏覽代碼

MHD_connection_update_event_loop_info(): do not update states of suspended connections

Evgeny Grin (Karlson2k) 8 年之前
父節點
當前提交
858483b5be
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/microhttpd/connection.c

+ 4 - 3
src/microhttpd/connection.c

@@ -1458,6 +1458,9 @@ transmit_error_response (struct MHD_Connection *connection,
 static void
 MHD_connection_update_event_loop_info (struct MHD_Connection *connection)
 {
+  /* Do not update states of suspended connection */
+  if (connection->suspended)
+    return; /* States will be updated after resume. */
   while (1)
     {
 #if DEBUG_STATES
@@ -1510,9 +1513,7 @@ MHD_connection_update_event_loop_info (struct MHD_Connection *connection)
             {
               if ((MHD_YES != try_grow_read_buffer (connection)) &&
                   (0 != (connection->daemon->options &
-                         MHD_USE_INTERNAL_POLLING_THREAD)) &&
-                  (! connection->suspended) &&
-                  (! connection->resuming))
+                         MHD_USE_INTERNAL_POLLING_THREAD)))
                 {
                   /* failed to grow the read buffer, and the
                      client which is supposed to handle the