Don't try to send to closed socket

This commit is contained in:
shortcutme 2017-06-19 16:18:20 +02:00
parent f1786c2ee6
commit 14cd9315c1
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -356,6 +356,11 @@ class Connection(object):
message.get("params", {}).get("site"), message.get("params", {}).get("inner_path"), message.get("params", {}).get("site"), message.get("params", {}).get("inner_path"),
message.get("req_id")) message.get("req_id"))
) )
if not self.sock:
self.log("Send error: missing socket")
return False
self.last_send_time = time.time() self.last_send_time = time.time()
try: try:
if streaming: if streaming: