feat: error handling during disconnection

fix: various session disctonnect error (replication submodule)
This commit is contained in:
Swann Martinez 2020-02-21 12:00:34 +01:00
parent 56a625ae48
commit 7d989faae6
No known key found for this signature in database
GPG Key ID: 414CCAFD8DA720E1
2 changed files with 10 additions and 9 deletions

@ -1 +1 @@
Subproject commit 0f2ae759a710609031c24c251249d39a4d37173d
Subproject commit 90fdb447f327ee9a02bcdd62adec6f89f6ab3749

View File

@ -159,16 +159,10 @@ class SessionStopOperator(bpy.types.Operator):
def execute(self, context):
global client, delayables, stop_modal_executor, server_process
if server_process:
server_process.kill()
assert(client)
stop_modal_executor = True
settings = context.window_manager.session
settings.is_admin = False
assert(client)
client.disconnect()
for d in delayables:
try:
@ -177,6 +171,13 @@ class SessionStopOperator(bpy.types.Operator):
continue
presence.renderer.stop()
try:
client.disconnect()
except Exception as e:
self.report({'ERROR'}, repr(e))
client = None
return {"FINISHED"}