4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00

Quick fix to ZMQ deadlock error (#784)

quick fix
This commit is contained in:
Ethan Weber 2022-10-16 11:39:11 -07:00 committed by GitHub
parent d4670de94d
commit 555cec9387
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,9 +236,11 @@ class ViewerState:
CONSOLE.rule(characters="=")
CONSOLE.line()
self.vis = Viewer(zmq_port=zmq_port)
self.vis_webrtc_thread = Viewer(zmq_port=zmq_port)
else:
assert self.config.zmq_port is not None
self.vis = Viewer(zmq_port=self.config.zmq_port, ip_address=self.config.ip_address)
self.vis_webrtc_thread = Viewer(zmq_port=self.config.zmq_port, ip_address=self.config.ip_address)
# viewer specific variables
self.prev_camera_matrix = None
@ -488,8 +490,10 @@ class ViewerState:
answer = await pc.createAnswer()
await pc.setLocalDescription(answer)
self.vis["webrtc/answer"].write({"sdp": pc.localDescription.sdp, "type": pc.localDescription.type})
self.vis["webrtc/answer"].delete()
self.vis_webrtc_thread["webrtc/answer"].write(
{"sdp": pc.localDescription.sdp, "type": pc.localDescription.type}
)
self.vis_webrtc_thread["webrtc/answer"].delete()
# continually exchange media
while True: