mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-08 23:07:46 +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:
@ -61,12 +61,11 @@ public class TestClient extends ApplicationAdapter implements PacketProcessor {
|
|||||||
|
|
||||||
ChannelFuture f = b.connect("localhost", TestServer.PORT).sync();
|
ChannelFuture f = b.connect("localhost", TestServer.PORT).sync();
|
||||||
sendPacket();
|
sendPacket();
|
||||||
f.channel().closeFuture().sync();
|
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
Gdx.app.error(TAG, t.getMessage(), t);
|
Gdx.app.error(TAG, t.getMessage(), t);
|
||||||
|
Gdx.app.exit();
|
||||||
} finally {
|
} finally {
|
||||||
group.shutdownGracefully();
|
group.shutdownGracefully();
|
||||||
Gdx.app.exit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,12 +62,11 @@ public class TestServer extends ApplicationAdapter implements PacketProcessor {
|
|||||||
;
|
;
|
||||||
|
|
||||||
ChannelFuture f = b.bind(PORT).sync();
|
ChannelFuture f = b.bind(PORT).sync();
|
||||||
f.channel().closeFuture().sync();
|
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
Gdx.app.error(TAG, t.getMessage(), t);
|
Gdx.app.error(TAG, t.getMessage(), t);
|
||||||
|
Gdx.app.exit();
|
||||||
} finally {
|
} finally {
|
||||||
group.shutdownGracefully();
|
group.shutdownGracefully();
|
||||||
Gdx.app.exit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,12 +63,11 @@ public class TestClient extends ApplicationAdapter implements PacketProcessor {
|
|||||||
|
|
||||||
ChannelFuture f = b.connect("localhost", TestServer.PORT).sync();
|
ChannelFuture f = b.connect("localhost", TestServer.PORT).sync();
|
||||||
sendPacket();
|
sendPacket();
|
||||||
f.channel().closeFuture().sync();
|
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
Gdx.app.error(TAG, t.getMessage(), t);
|
Gdx.app.error(TAG, t.getMessage(), t);
|
||||||
|
Gdx.app.exit();
|
||||||
} finally {
|
} finally {
|
||||||
workerGroup.shutdownGracefully();
|
workerGroup.shutdownGracefully();
|
||||||
Gdx.app.exit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,10 +62,10 @@ public class TestServer extends ApplicationAdapter implements PacketProcessor {
|
|||||||
f.channel().closeFuture().sync();
|
f.channel().closeFuture().sync();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
Gdx.app.error(TAG, t.getMessage(), t);
|
Gdx.app.error(TAG, t.getMessage(), t);
|
||||||
|
Gdx.app.exit();
|
||||||
} finally {
|
} finally {
|
||||||
workerGroup.shutdownGracefully();
|
workerGroup.shutdownGracefully();
|
||||||
bossGroup.shutdownGracefully();
|
bossGroup.shutdownGracefully();
|
||||||
Gdx.app.exit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user