using reader idle to trigger the will message.
When client power off directly, the socket is broken and server may still push messages, which just occurred TCP re-transmission at that time, instead of raising an error immediately. This delayed the will message.
This commit is contained in:
@@ -519,7 +519,7 @@ public class ProtocolProcessor {
|
||||
if (pipeline.names().contains("idleStateHandler")) {
|
||||
pipeline.remove("idleStateHandler");
|
||||
}
|
||||
pipeline.addFirst("idleStateHandler", new IdleStateHandler(0, 0, idleTime));
|
||||
pipeline.addFirst("idleStateHandler", new IdleStateHandler(idleTime, 0, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user