summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ogRest.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ogRest.py b/src/ogRest.py
index 4fb2bba..fed998e 100644
--- a/src/ogRest.py
+++ b/src/ogRest.py
@@ -318,10 +318,10 @@ class ogRest():
response = restResponse(ogResponses.IN_PROGRESS)
client.send(response.get())
- client.disconnect()
-
- if self.state == ThreadState.BUSY:
- self.kill_process()
+ if self.mode != 'virtual':
+ client.disconnect()
+ if self.state == ThreadState.BUSY:
+ self.kill_process()
threading.Thread(target=ogThread.reboot, args=(self,)).start()
@@ -329,10 +329,10 @@ class ogRest():
response = restResponse(ogResponses.IN_PROGRESS)
client.send(response.get())
- client.disconnect()
-
- if self.state == ThreadState.BUSY:
- self.kill_process()
+ if self.mode != 'virtual':
+ client.disconnect()
+ if self.state == ThreadState.BUSY:
+ self.kill_process()
threading.Thread(target=ogThread.poweroff, args=(self,)).start()