webui icon indicating copy to clipboard operation
webui copied to clipboard

Timeout - Window close should fire mutex close event

Open AlbertShown opened this issue 7 months ago • 0 comments

webui.set_timeout(0)

window = webui.Window()
window.show("<html><script src='webui.js'></script> Window 1 - You have 5 seconds to manually close me... </html>")
sleep(5)
window.close()

# Tell WebUI `webui.wait()` to wait 3 seconds after close
webui.set_timeout(3)

window = webui.Window()
window.show("<html><script src='webui.js'></script> Window 2 </html>")

webui.wait() # Window close should fire mutex close event... but it does not
[Core]          _webui_ws_process(6) -> WEBUI_WS_CLOSE
[Core]          _webui_ws_process(6) -> Finished.
[Core]          _webui_free_mem(0x0000000000000000)
[Core]          _webui_free_mem(0x000002E4103B9500)
[Core]          _webui_free_mem(0x000002E4103B9500) -> Pointer #22 freed (56 + 1 bytes)
[Core]          _webui_server_thread([2]) -> Window disconnected
[Core]          _webui_server_thread([2]) -> Waiting for reconnection
[Core]          _webui_timer_start()
[Core]          _webui_server_thread([2]) -> Cleaning
[Core]          _webui_free_port([18857])
[Core]          _webui_free_mem(0x000002E4103B8A10)
[Core]          _webui_free_mem(0x000002E4103B8A10) -> Pointer #21 freed (64 + 1 bytes)
[Core]          _webui_server_thread([2]) -> Server stopped.

AlbertShown avatar May 05 '25 21:05 AlbertShown