Просмотр исходного кода

MHD_get_timeout(): fixed incorrect timeout for TLS connections.
If connection is in "MHD_EVENT_LOOP_INFO_WRITE" mode, any pending incoming data should not
result in zero timeout.
Already handled properly by 'data_already_pending'.
Note: old check was incorrect even for "MHD_EVENT_LOOP_INFO_READ" connections as only
first connection in "normal timeout" list was checked.

Evgeny Grin (Karlson2k) 9 лет назад
Родитель
Сommit
0b4e8535a3
1 измененных файлов с 0 добавлено и 10 удалено
  1. 0 10
      src/microhttpd/daemon.c

+ 0 - 10
src/microhttpd/daemon.c

@@ -2992,11 +2992,6 @@ MHD_get_timeout (struct MHD_Daemon *daemon,
 	  if ( (! have_timeout) ||
 	       (earliest_deadline > pos->last_activity + pos->connection_timeout) )
 	    earliest_deadline = pos->last_activity + pos->connection_timeout;
-#ifdef HTTPS_SUPPORT
-	  if (  (0 != (daemon->options & MHD_USE_TLS)) &&
-		(0 != gnutls_record_check_pending (pos->tls_session)) )
-	    earliest_deadline = 0;
-#endif /* HTTPS_SUPPORT */
 	  have_timeout = MHD_YES;
 	}
     }
@@ -3008,11 +3003,6 @@ MHD_get_timeout (struct MHD_Daemon *daemon,
       if ( (! have_timeout) ||
 	   (earliest_deadline > pos->last_activity + pos->connection_timeout) )
 	earliest_deadline = pos->last_activity + pos->connection_timeout;
-#ifdef HTTPS_SUPPORT
-      if (  (0 != (daemon->options & MHD_USE_TLS)) &&
-	    (0 != gnutls_record_check_pending (pos->tls_session)) )
-	earliest_deadline = 0;
-#endif /* HTTPS_SUPPORT */
       have_timeout = MHD_YES;
     }