@@ -112,7 +112,6 @@ private class BeatsInitializer extends ChannelInitializer<SocketChannel> {
112
112
private final int IDLESTATE_WRITER_IDLE_TIME_SECONDS = 5 ;
113
113
114
114
private final EventExecutorGroup idleExecutorGroup ;
115
- private final EventExecutorGroup beatsHandlerExecutorGroup ;
116
115
private final IMessageListener localMessageListener ;
117
116
private final int localClientInactivityTimeoutSeconds ;
118
117
@@ -121,7 +120,6 @@ private class BeatsInitializer extends ChannelInitializer<SocketChannel> {
121
120
this .localMessageListener = messageListener ;
122
121
this .localClientInactivityTimeoutSeconds = clientInactivityTimeoutSeconds ;
123
122
idleExecutorGroup = new DefaultEventExecutorGroup (DEFAULT_IDLESTATEHANDLER_THREAD );
124
- beatsHandlerExecutorGroup = new DefaultEventExecutorGroup (beatsHandlerThread );
125
123
}
126
124
127
125
public void initChannel (SocketChannel socket ){
@@ -134,7 +132,8 @@ public void initChannel(SocketChannel socket){
134
132
new IdleStateHandler (localClientInactivityTimeoutSeconds , IDLESTATE_WRITER_IDLE_TIME_SECONDS , localClientInactivityTimeoutSeconds ));
135
133
pipeline .addLast (BEATS_ACKER , new AckEncoder ());
136
134
pipeline .addLast (CONNECTION_HANDLER , new ConnectionHandler ());
137
- pipeline .addLast (beatsHandlerExecutorGroup , new BeatsParser (), new BeatsHandler (localMessageListener ));
135
+ pipeline .addLast (new BeatsParser ());
136
+ pipeline .addLast (new BeatsHandler (localMessageListener ));
138
137
}
139
138
140
139
@@ -152,7 +151,6 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws E
152
151
public void shutdownEventExecutor () {
153
152
try {
154
153
idleExecutorGroup .shutdownGracefully ().sync ();
155
- beatsHandlerExecutorGroup .shutdownGracefully ().sync ();
156
154
} catch (InterruptedException e ) {
157
155
throw new IllegalStateException (e );
158
156
}
0 commit comments