Skip to content

Commit

Permalink
Fix send_recv
Browse files Browse the repository at this point in the history
Fixes #28.
  • Loading branch information
FichteFoll committed Apr 11, 2018
1 parent 170b86d commit 61977ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discord_ipc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ def __exit__(self, *_):

def send_recv(self, data, *, op=OP_FRAME):
nonce = data.get('nonce')
self.send(data, op)
self.send(data, op=op)
while True:
# TODO timeout
reply = self.recv()
if reply.get('nonce') == nonce:
if reply[1].get('nonce') == nonce:
return reply
else:
logger.warning("received unexpected reply; %s", reply)
Expand Down

0 comments on commit 61977ec

Please sign in to comment.