Skip to content

Commit

Permalink
Fix Py3.5 compile issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsaxon committed Apr 30, 2019
1 parent 006cefb commit 3c8d3a3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pysonofflan/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def __init__(self, **kwds):
self.ping_interval = V6_DEFAULT_PING_INTERVAL
self.ping_timeout = V6_DEFAULT_TIMEOUT

self.close_code: int
self.close_reason: str
#self.close_code: int
#self.close_reason: str

# Task sending keepalive pings.
self.keepalive_ping_task = None
Expand Down Expand Up @@ -260,10 +260,10 @@ def connection_lost(self, exc):
logger.debug("%s - event = connection_lost(%s)", self.side, exc)
self.state = State.CLOSED
logger.debug("%s - state = CLOSED", self.side)
#if not hasattr(self, "close_code"):
self.close_code = 1006
#if not hasattr(self, "close_reason"):
self.close_reason = ""
if self.close_code is None:
self.close_code = 1006
if self.close_reason is None:
self.close_reason = ""
logger.debug(
"%s x code = %d, reason = %s",
self.side,
Expand Down

0 comments on commit 3c8d3a3

Please sign in to comment.