Skip to content

Commit 1f1c56b

Browse files
touilleManpgjones
authored andcommitted
Fix bug in example/synchronous_client.py
1 parent dec56c0 commit 1f1c56b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

example/synchronous_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def net_send(ws, conn):
111111
def net_recv(ws, conn):
112112
''' Read pending data from network into websocket. '''
113113
in_data = conn.recv(RECEIVE_BYTES)
114-
if in_data:
114+
if not in_data:
115115
# A receive of zero bytes indicates the TCP socket has been closed. We
116116
# need to pass None to wsproto to update its internal state.
117117
print('Received 0 bytes (connection closed)')

0 commit comments

Comments
 (0)