mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-19 16:57:20 +07:00
Moved exit function to catch block and removed sync which was blocking create thread and thus render loop
This commit is contained in:
parent
8eee5fd8f3
commit
3dc8136462
@ -61,12 +61,11 @@ public class TestClient extends ApplicationAdapter implements PacketProcessor {
|
||||
|
||||
ChannelFuture f = b.connect("localhost", TestServer.PORT).sync();
|
||||
sendPacket();
|
||||
f.channel().closeFuture().sync();
|
||||
} catch (Throwable t) {
|
||||
Gdx.app.error(TAG, t.getMessage(), t);
|
||||
Gdx.app.exit();
|
||||
} finally {
|
||||
group.shutdownGracefully();
|
||||
Gdx.app.exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,12 +62,11 @@ public class TestServer extends ApplicationAdapter implements PacketProcessor {
|
||||
;
|
||||
|
||||
ChannelFuture f = b.bind(PORT).sync();
|
||||
f.channel().closeFuture().sync();
|
||||
} catch (Throwable t) {
|
||||
Gdx.app.error(TAG, t.getMessage(), t);
|
||||
Gdx.app.exit();
|
||||
} finally {
|
||||
group.shutdownGracefully();
|
||||
Gdx.app.exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,12 +63,11 @@ public class TestClient extends ApplicationAdapter implements PacketProcessor {
|
||||
|
||||
ChannelFuture f = b.connect("localhost", TestServer.PORT).sync();
|
||||
sendPacket();
|
||||
f.channel().closeFuture().sync();
|
||||
} catch (Throwable t) {
|
||||
Gdx.app.error(TAG, t.getMessage(), t);
|
||||
Gdx.app.exit();
|
||||
} finally {
|
||||
workerGroup.shutdownGracefully();
|
||||
Gdx.app.exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,10 +62,10 @@ public class TestServer extends ApplicationAdapter implements PacketProcessor {
|
||||
f.channel().closeFuture().sync();
|
||||
} catch (Throwable t) {
|
||||
Gdx.app.error(TAG, t.getMessage(), t);
|
||||
Gdx.app.exit();
|
||||
} finally {
|
||||
workerGroup.shutdownGracefully();
|
||||
bossGroup.shutdownGracefully();
|
||||
Gdx.app.exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user