Skip to content

Commit

Permalink
use close_fd and close the writer before the reader
Browse files Browse the repository at this point in the history
  • Loading branch information
mmerickel committed Jan 26, 2024
1 parent 50a0df4 commit ae88a1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hupper/reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import threading
import time

from .ipc import ProcessGroup
from .ipc import ProcessGroup, close_fd
from .logger import DefaultLogger, SilentLogger
from .utils import (
WIN,
Expand Down Expand Up @@ -195,8 +195,8 @@ def _start_control(self):
try:
yield
finally:
os.close(self.control_r)
os.close(self.control_w)
close_fd(self.control_w)
close_fd(self.control_r)
self.control_r = self.control_w = None

def _control_proxy(self, signal):
Expand Down

0 comments on commit ae88a1b

Please sign in to comment.