Skip to content

Commit

Permalink
Delete pipe file if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Dec 30, 2022
1 parent a756b23 commit 047567f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frigate/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def __init__(
birdseye_rtsp: bool = False,
):
if birdseye_rtsp:
if os.path.exists(BIRDSEYE_PIPE):
os.remove(BIRDSEYE_PIPE)

os.mkfifo(BIRDSEYE_PIPE, mode=0o777)
stdin = os.open(BIRDSEYE_PIPE, os.O_RDONLY | os.O_NONBLOCK)
self.bd_pipe = os.open(BIRDSEYE_PIPE, os.O_WRONLY)
Expand Down Expand Up @@ -96,7 +99,6 @@ def read(self, length):
def exit(self):
if self.bd_pipe:
os.close(self.bd_pipe)
os.remove(BIRDSEYE_PIPE)

self.process.terminate()
try:
Expand Down

0 comments on commit 047567f

Please sign in to comment.