diff mbox series

Webserver: drop multiplication factor for monitoring

Message ID 20191209151010.17768-1-sbabic@denx.de
State Accepted
Headers show
Series Webserver: drop multiplication factor for monitoring | expand

Commit Message

Stefano Babic Dec. 9, 2019, 3:10 p.m. UTC
Commit 37089b0 introduces monitoring of the data connection when an
update is started. The value passed with the "-t" parameter is then
interpreted as timer value to check the connection, while a broken
connection is recognized only if no data is received after the timer
elapses at least two times. Drop the multiplication factor and check for
incoming data when the timer elapses.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 mongoose/mongoose_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c
index 2b71119..1d95556 100644
--- a/mongoose/mongoose_interface.c
+++ b/mongoose/mongoose_interface.c
@@ -394,7 +394,7 @@  static void ev_handler(struct mg_connection *nc, int ev, void *ev_data)
 		 * Check if a multi-part was initiated
 		 */
 		if (nc->user_data && (watchdog_conn > 0) &&
-			(difftime(now, nc->last_io_time) > 2 * watchdog_conn)) {
+			(difftime(now, nc->last_io_time) > watchdog_conn)) {
 			struct file_upload_state *fus;
 
 		       /* Connection lost, drop data */