ncannasse 9 years ago
parent
commit
fb2c743691
1 changed files with 1 additions and 0 deletions
  1. 1 0
      hxd/net/LocalHost.hx

+ 1 - 0
hxd/net/LocalHost.hx

@@ -108,6 +108,7 @@ class LocalHost extends NetworkHost {
 		socket.bind(host, port, function(s) {
 		socket.bind(host, port, function(s) {
 			var c = new LocalClient(this, s);
 			var c = new LocalClient(this, s);
 			pendingClients.push(c);
 			pendingClients.push(c);
+			s.onError = function(_) c.stop();
 			if( onConnected != null ) onConnected(c);
 			if( onConnected != null ) onConnected(c);
 		});
 		});
 		isAuth = true;
 		isAuth = true;