SNIClient: set SNESState to SNES_DISCONNECTED when disconnected (#3188)

This commit is contained in:
Silvris
2024-04-21 09:59:19 -05:00
committed by GitHub
parent 392c47dcef
commit 3e27b93c37

View File

@@ -85,6 +85,7 @@ class SNIClientCommandProcessor(ClientCommandProcessor):
"""Close connection to a currently connected snes""" """Close connection to a currently connected snes"""
self.ctx.snes_reconnect_address = None self.ctx.snes_reconnect_address = None
self.ctx.cancel_snes_autoreconnect() self.ctx.cancel_snes_autoreconnect()
self.ctx.snes_state = SNESState.SNES_DISCONNECTED
if self.ctx.snes_socket and not self.ctx.snes_socket.closed: if self.ctx.snes_socket and not self.ctx.snes_socket.closed:
async_start(self.ctx.snes_socket.close()) async_start(self.ctx.snes_socket.close())
return True return True