Skip to content

Commit

Permalink
don't read from pipe if it's empty
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianVollmer committed Apr 24, 2019
1 parent e3d9986 commit a8fdc66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ph
Expand Up @@ -93,7 +93,8 @@ def send_packet(p, return_response=False):
return p
else:
r, _, _ = select.select([signal_pipe[0]], [], [], 3)
os.read(r[0], 1024)
if r:
os.read(r[0], 1024)


def recv_packet(sock):
Expand Down

0 comments on commit a8fdc66

Please sign in to comment.