Skip to content

Commit

Permalink
Remove asyncio reader when quitting terminal (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart authored May 13, 2024
1 parent 5b15a32 commit d5a5b17
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/terminals/fps_terminals/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def on_output():
self.data_or_disconnect = self.p_out.read(65536).decode()
self.event.set()
except Exception:
os.close(self.fd)
self.loop.remove_reader(self.p_out)
self.data_or_disconnect = None
self.event.set()
Expand Down Expand Up @@ -74,3 +75,4 @@ def quit(self, websocket):
self.websockets.remove(websocket)
if not self.websockets:
os.close(self.fd)
self.loop.remove_reader(self.p_out)

0 comments on commit d5a5b17

Please sign in to comment.