Przeglądaj źródła

reset NetworkHost.current to null on close()

Nicolas Cannasse 8 lat temu
rodzic
commit
8cdbc3b397
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      hxd/net/SocketHost.hx

+ 1 - 0
hxd/net/SocketHost.hx

@@ -80,6 +80,7 @@ class SocketHost extends NetworkHost {
 			socket = null;
 		}
 		connected = false;
+		if( NetworkHost.current == this ) NetworkHost.current = null;
 	}
 
 	public function connect( host : String, port : Int, ?onConnect : Bool -> Void ) {