More server debugging changes.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#Autogenerated file. Do not modify.
|
#Autogenerated file. Do not modify.
|
||||||
#Wed Feb 28 15:00:57 EST 2018
|
#Thu Mar 01 09:15:00 EST 2018
|
||||||
version=release
|
version=release
|
||||||
androidBuildCode=319
|
androidBuildCode=319
|
||||||
name=Mindustry
|
name=Mindustry
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class KryoServer implements ServerProvider {
|
|||||||
c.id = kn.id;
|
c.id = kn.id;
|
||||||
c.addressTCP = ip;
|
c.addressTCP = ip;
|
||||||
|
|
||||||
Log.info("&bRecieved connection: {0} / {1}", c.id, c.addressTCP);
|
Log.info("&bRecieved connection: {0} / {1}. Kryonet ID: {2}", c.id, c.addressTCP, connection.getID());
|
||||||
|
|
||||||
connections.add(kn);
|
connections.add(kn);
|
||||||
Gdx.app.postRunnable(() -> Net.handleServerReceived(kn.id, c));
|
Gdx.app.postRunnable(() -> Net.handleServerReceived(kn.id, c));
|
||||||
@@ -81,15 +81,18 @@ public class KryoServer implements ServerProvider {
|
|||||||
@Override
|
@Override
|
||||||
public void disconnected (Connection connection) {
|
public void disconnected (Connection connection) {
|
||||||
KryoConnection k = getByKryoID(connection.getID());
|
KryoConnection k = getByKryoID(connection.getID());
|
||||||
|
Log.info("&bLost kryonet connection {0}", connection.getID());
|
||||||
if(k == null) return;
|
if(k == null) return;
|
||||||
connections.remove(k);
|
|
||||||
|
|
||||||
Disconnect c = new Disconnect();
|
Disconnect c = new Disconnect();
|
||||||
c.id = k.id;
|
c.id = k.id;
|
||||||
|
|
||||||
Log.info("&bLost connection: {0}", k.id);
|
Log.info("&bLost connection: {0}", k.id);
|
||||||
|
|
||||||
Gdx.app.postRunnable(() -> Net.handleServerReceived(k.id, c));
|
Gdx.app.postRunnable(() -> {
|
||||||
|
Net.handleServerReceived(k.id, c);
|
||||||
|
connections.remove(k);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user