mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 15:00:09 +01:00
Merge pull request #795 from Faless/ws/3.x_fix_disconnect
[3.x] [WebSocket] Fix peer disconnection not closing the network layer.
This commit is contained in:
@@ -81,6 +81,10 @@ func _on_Host_pressed():
|
||||
|
||||
|
||||
func _on_Disconnect_pressed():
|
||||
if peer is WebSocketServer:
|
||||
peer.stop()
|
||||
elif peer is WebSocketClient:
|
||||
peer.disconnect_from_host()
|
||||
_close_network()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user