Skip to content

Commit

Permalink
Error if no peer connection found
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Jun 13, 2017
1 parent a4a23f3 commit ae21f05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Peer/Peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ def request(self, cmd, params={}, stream_to=None):

for retry in range(1, 4): # Retry 3 times
try:
if not self.connection:
raise Exception("No connection found")
res = self.connection.request(cmd, params, stream_to)
if not res:
raise Exception("Send error")
Expand Down

0 comments on commit ae21f05

Please sign in to comment.