Skip to content

Commit abd7b13

Browse files
Add comment
1 parent a0ade99 commit abd7b13

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

httpcore/_async/http11.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ def is_available(self) -> bool:
293293

294294
def has_expired(self) -> bool:
295295
if self._server_disconnected:
296+
# Connection that is disconnected by the server is considered expired.
297+
# Pool then cleans up this connection by closing it.
296298
return True
297299

298300
now = time.monotonic()

httpcore/_sync/http11.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ def is_available(self) -> bool:
293293

294294
def has_expired(self) -> bool:
295295
if self._server_disconnected:
296+
# Connection that is disconnected by the server is considered expired.
297+
# Pool then cleans up this connection by closing it.
296298
return True
297299

298300
now = time.monotonic()

0 commit comments

Comments
 (0)