MCPcopy
hub / github.com/urllib3/urllib3 / is_connection_dropped

Function is_connection_dropped

src/urllib3/util/connection.py:15–20  ·  view source on GitHub ↗

Returns True if the connection is dropped and should be closed. :param conn: :class:`urllib3.connection.HTTPConnection` object.

(conn: BaseHTTPConnection)

Source from the content-addressed store, hash-verified

13
14
15def is_connection_dropped(conn: BaseHTTPConnection) -> bool: # Platform-specific
16 """
17 Returns True if the connection is dropped and should be closed.
18 :param conn: :class:`urllib3.connection.HTTPConnection` object.
19 """
20 return not conn.is_connected
21
22
23# This function is copied from socket.py in the Python 2.7 standard

Callers 1

_get_connMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected