MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / sock_closed

Method sock_closed

test/functional/interface_http.py:40–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

38 self.conn.connect()
39
40 def sock_closed(self):
41 if self.conn.sock is None:
42 return True
43 try:
44 self.conn.request('GET', '/')
45 self.conn.getresponse().read()
46 return False
47 except NETWORK_ERRORS:
48 return True
49
50 def close_sock(self):
51 self.conn.close()

Calls 2

requestMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected