Commit 836db39d authored by Guillaume Seguin's avatar Guillaume Seguin

Lock disconnect() too

parent 617a8646
...@@ -95,6 +95,7 @@ class printcore(): ...@@ -95,6 +95,7 @@ class printcore():
self.z_feedrate = None self.z_feedrate = None
self.pronterface = None self.pronterface = None
@locked
def disconnect(self): def disconnect(self):
"""Disconnects from printer and pauses the print """Disconnects from printer and pauses the print
""" """
...@@ -111,6 +112,8 @@ class printcore(): ...@@ -111,6 +112,8 @@ class printcore():
self.printer.close() self.printer.close()
except socket.error: except socket.error:
pass pass
except OSError:
pass
self.printer = None self.printer = None
self.online = False self.online = False
self.printing = False self.printing = False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment