From 6d2bf3a4b5f102d51d55ad687caf6d10c73a0f19 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Sat, 20 Jul 2024 11:42:39 +0800 Subject: [PATCH] remove manual timeout for socket --- http_server/http_server.tbs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/http_server/http_server.tbs b/http_server/http_server.tbs index c245973..53c31a8 100644 --- a/http_server/http_server.tbs +++ b/http_server/http_server.tbs @@ -454,13 +454,13 @@ sub http_server_proc_timer() dim prev_sock as byte=sock.num for ii=0 to HTTP_SERVER_COUNT-1 if http_servers(ii).state<>HTTP_SERVER_STATE_IDLE then - if http_servers(ii).ts + 5000 < sys.timercountms then - sys.debugprint("HTTP>timeout") - http_servers(ii).state=HTTP_SERVER_STATE_IDLE - sock.num=http_servers(ii).socket - sock.close() - sock.num=prev_sock - end if + ' if http_servers(ii).ts + 5000 < sys.timercountms then + ' sys.debugprint("HTTP>timeout") + ' http_servers(ii).state=HTTP_SERVER_STATE_IDLE + ' sock.num=http_servers(ii).socket + ' sock.close() + ' sock.num=prev_sock + ' end if end if next ii