1
0
Fork 0

Make network connections keepalive (close #11)

kcx-1614
Prototik 2015-06-29 20:47:12 +07:00
parent 50bc729381
commit 499c680b58
1 changed files with 9 additions and 0 deletions

View File

@ -86,6 +86,15 @@
if (this.channel.isOpen())
{
this.channel.close();
@@ -254,7 +288,7 @@
{
;
}
-
+ try { p_initChannel_1_.config().setOption(ChannelOption.SO_KEEPALIVE, true); } catch (ChannelException ignored) {}
try
{
p_initChannel_1_.config().setOption(ChannelOption.TCP_NODELAY, Boolean.valueOf(false));
@@ -322,6 +356,13 @@
return channel;
}