Skip to content

Commit

Permalink
Update comment about NPTY bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cflems committed Jan 13, 2023
1 parent 352a8d9 commit 2506007
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkd_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,14 @@ def run_pty(screen, cn):

try:
data = screen.recv(1024)
# TODO: there is an artifact here due to use of blocking sockets:
# must hit 1 additional key before PTY mode will disable (because
# waiting for this recv.) This will be patched out when we switch
# to using selectors.
if not alive:
return False
except:
data = b'\xde\xad'
# TODO: problem is here: we wake up and suddenly not in pty mode
if not data or data == b'\xde\xad':
unpty(client)
return False
Expand Down

0 comments on commit 2506007

Please sign in to comment.