Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb7c18d

Browse files
committed
Fixes #1452
1 parent 657d711 commit eb7c18d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/request/connect.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ def _connReadProxy(conn):
185185
kb.pageCompress = False
186186
else:
187187
while True:
188-
_ = conn.read(MAX_CONNECTION_CHUNK_SIZE)
188+
if not conn:
189+
break
190+
else:
191+
_ = conn.read(MAX_CONNECTION_CHUNK_SIZE)
192+
189193
if len(_) == MAX_CONNECTION_CHUNK_SIZE:
190194
warnMsg = "large response detected. This could take a while"
191195
singleTimeWarnMessage(warnMsg)

0 commit comments

Comments
 (0)