feat: expose connection TTL
This commit is contained in:
Submodule multi_user/libs/replication updated: d3601d5082...727bd6bbb1
@ -130,7 +130,9 @@ class SessionStartOperator(bpy.types.Operator):
|
|||||||
id=settings.username,
|
id=settings.username,
|
||||||
address=settings.ip,
|
address=settings.ip,
|
||||||
port=settings.port,
|
port=settings.port,
|
||||||
ipc_port=settings.ipc_port)
|
ipc_port=settings.ipc_port,
|
||||||
|
timeout=settings.connection_timeout
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.report({'ERROR'}, repr(e))
|
self.report({'ERROR'}, repr(e))
|
||||||
logger.error(f"Error: {e}")
|
logger.error(f"Error: {e}")
|
||||||
@ -146,7 +148,8 @@ class SessionStartOperator(bpy.types.Operator):
|
|||||||
id=settings.username,
|
id=settings.username,
|
||||||
address=settings.ip,
|
address=settings.ip,
|
||||||
port=settings.port,
|
port=settings.port,
|
||||||
ipc_port=settings.ipc_port
|
ipc_port=settings.ipc_port,
|
||||||
|
timeout=settings.connection_timeout
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.report({'ERROR'}, repr(e))
|
self.report({'ERROR'}, repr(e))
|
||||||
|
@ -102,6 +102,11 @@ class SessionPrefs(bpy.types.AddonPreferences):
|
|||||||
name="cache directory",
|
name="cache directory",
|
||||||
subtype="DIR_PATH",
|
subtype="DIR_PATH",
|
||||||
default=environment.DEFAULT_CACHE_DIR)
|
default=environment.DEFAULT_CACHE_DIR)
|
||||||
|
connection_timeout: bpy.props.IntProperty(
|
||||||
|
name='connection timeout',
|
||||||
|
description='connection timeout before disconnection',
|
||||||
|
default=1000
|
||||||
|
)
|
||||||
# for UI
|
# for UI
|
||||||
category: bpy.props.EnumProperty(
|
category: bpy.props.EnumProperty(
|
||||||
name="Category",
|
name="Category",
|
||||||
|
@ -179,6 +179,9 @@ class SESSION_PT_settings_network(bpy.types.Panel):
|
|||||||
row = box.row()
|
row = box.row()
|
||||||
row.label(text="IPC Port:")
|
row.label(text="IPC Port:")
|
||||||
row.prop(settings, "ipc_port", text="")
|
row.prop(settings, "ipc_port", text="")
|
||||||
|
row = box.row()
|
||||||
|
row.label(text="Timeout (ms):")
|
||||||
|
row.prop(settings, "connection_timeout", text="")
|
||||||
|
|
||||||
if runtime_settings.session_mode == 'HOST':
|
if runtime_settings.session_mode == 'HOST':
|
||||||
row = box.row()
|
row = box.row()
|
||||||
|
Reference in New Issue
Block a user