Skip to content

Commit 0850aba

Browse files
authored
Merge pull request #45 from foxy82/main
Fix infinite loop when requesting too quickly
2 parents c2e832a + 1649a45 commit 0850aba

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

adafruit_httpserver/response.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,3 +299,4 @@ def _send_bytes(
299299
continue
300300
if exc.errno == ECONNRESET:
301301
return
302+
raise

adafruit_httpserver/server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def _receive_header_bytes(
106106
except OSError as ex:
107107
if ex.errno == ETIMEDOUT:
108108
break
109+
raise
109110
except Exception as ex:
110111
raise ex
111112
return received_bytes
@@ -124,6 +125,7 @@ def _receive_body_bytes(
124125
except OSError as ex:
125126
if ex.errno == ETIMEDOUT:
126127
break
128+
raise
127129
except Exception as ex:
128130
raise ex
129131
return received_body_bytes[:content_length]

0 commit comments

Comments
 (0)