Skip to content

Commit 8952813

Browse files
committed
requests: close socket on all exception types, not just OSError
1 parent dfbd9e6 commit 8952813

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python-ecosys/requests/requests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def request(
176176
resp_d[k] = v.strip()
177177
else:
178178
parse_headers(l, resp_d)
179-
except OSError:
179+
except Exception:
180180
s.close()
181181
raise
182182

0 commit comments

Comments
 (0)