Commit 556f8e6a authored by Yori Fournier's avatar Yori Fournier
Browse files

add the run function in mplServer2

parent 3fc11be1
Pipeline #420 failed with stage
in 1 minute and 22 seconds
import SocketServer
import pickle
import threading
from . import Signal,Status,Query,Answer
......@@ -266,6 +267,16 @@ class MplServer2(SocketServer.TCPServer):
SocketServer.TCPServer.__init__(self, (ip, port), handler)
self.initialized = True
def run(self, as_daemon=True):
self.server_thread = threading.Thread(target=self.serve_forever)
self.server_thread.daemon = as_daemon
self.running = True
def stop(self):
self.running = False
Supports Markdown
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