This commit is contained in:
Swann 2019-02-11 17:49:28 +01:00
parent 5e6d05ca92
commit 58fbdbf5bf
No known key found for this signature in database
GPG Key ID: B02D0B41F8B6D2EE
3 changed files with 9 additions and 6 deletions

View File

@ -149,11 +149,11 @@ class Client():
def stop(self): def stop(self):
logger.info("Stopping client") logger.info("Stopping client")
self.poller.unregister(self.pull_sock)
self.is_running = False self.is_running = False
self.task.cancel()
self.push_sock.close() self.push_sock.close()
self.pull_sock.close() self.pull_sock.close()
self.context.term() self.task.cancel()
class Server(): class Server():
@ -205,7 +205,8 @@ class Server():
def stop(self): def stop(self):
logger.info("Stopping server") logger.info("Stopping server")
self.task.cancel() self.poller.unregister(self.pull_sock)
self.pub_sock.close() self.pub_sock.close()
self.pull_sock.close() self.pull_sock.close()
self.context.term()
self.task.cancel()

View File

@ -173,8 +173,12 @@ class session_stop(bpy.types.Operator):
if server : if server :
server.stop() server.stop()
del server
server = None
if client: if client:
client.stop() client.stop()
del client
client = None
bpy.ops.asyncio.stop() bpy.ops.asyncio.stop()
else: else:
logger.info("No server/client running.") logger.info("No server/client running.")

View File

@ -30,8 +30,6 @@ class SessionPanel(bpy.types.Panel):
row = layout.row() row = layout.row()
# Debug area # Debug area
row.label(text="Debug")
row = layout.row() row = layout.row()
area_msg = row.box() area_msg = row.box()
if len(net_operators.client.store) > 0: if len(net_operators.client.store) > 0: