Explorar el Código

added daemon value to true to server thread as it will stop automaticly

Bachir Soussi Chiadmi hace 8 años
padre
commit
7aef277572
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      app.py

+ 1 - 0
app.py

@@ -45,6 +45,7 @@ class Server():
 
       self.httpd = http.server.HTTPServer(('', self.port), http.server.SimpleHTTPRequestHandler)
       self.thread = threading.Thread(target=self.httpd.serve_forever)
+      self.thread.daemon = True
       self.thread.start()
       print("serving at port", self._port)