refactor core modules, integrate network stats
This commit is contained in:
9
http2.py
9
http2.py
@@ -111,6 +111,15 @@ class RsHttp():
|
||||
def get_last_rocksock_exception(self):
|
||||
return self.last_rs_exception
|
||||
|
||||
def disconnect(self):
|
||||
"""Safely close the underlying connection."""
|
||||
if hasattr(self, 'conn') and self.conn:
|
||||
try:
|
||||
self.conn.disconnect()
|
||||
except:
|
||||
pass
|
||||
self.conn = None
|
||||
|
||||
def _err_log(self, s):
|
||||
if self.log_errors:
|
||||
sys.stderr.write(s + '\n')
|
||||
|
||||
Reference in New Issue
Block a user