fix game
Some checks failed
Dynamic Branch Deploy / build-and-deploy (push) Failing after 8m17s
Some checks failed
Dynamic Branch Deploy / build-and-deploy (push) Failing after 8m17s
This commit is contained in:
@@ -25,6 +25,15 @@ type wsConn struct {
|
||||
connected bool
|
||||
}
|
||||
|
||||
// disconnectFromServer trennt die bestehende WebSocket-Verbindung sauber
|
||||
func (g *Game) disconnectFromServer() {
|
||||
if g.wsConn != nil {
|
||||
g.wsConn.ws.Call("close")
|
||||
g.wsConn = nil
|
||||
}
|
||||
g.connected = false
|
||||
}
|
||||
|
||||
// connectToServer verbindet sich über WebSocket mit dem Gateway
|
||||
func (g *Game) connectToServer() {
|
||||
// Automatisch die richtige WebSocket-URL basierend auf der aktuellen Domain
|
||||
|
||||
Reference in New Issue
Block a user