From 40c78940efb9dccf30c862a82095abba9678fd4c Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Mon, 10 May 2021 21:27:40 +0200 Subject: [PATCH] don't close twice --- owrx/websocket.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/owrx/websocket.py b/owrx/websocket.py index 65ea7c9..a50fde7 100644 --- a/owrx/websocket.py +++ b/owrx/websocket.py @@ -244,6 +244,8 @@ class WebSocketConnection(object): self.interruptPipeRecv = None def close(self): + if not self.open: + return self.open = False self.interrupt()