File tree 1 file changed +3
-5
lines changed
providers/netty/src/main/java/org/asynchttpclient/providers/netty/ws 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -179,10 +179,8 @@ private boolean hasWebSocketTextListener() {
179
179
@ Override
180
180
public WebSocket addWebSocketListener (WebSocketListener l ) {
181
181
listeners .add (l );
182
- if (l instanceof WebSocketByteListener )
183
- interestedInByteMessages = true ;
184
- else if (l instanceof WebSocketTextListener )
185
- interestedInTextMessages = true ;
182
+ interestedInByteMessages = interestedInByteMessages || l instanceof WebSocketByteListener ;
183
+ interestedInTextMessages = interestedInTextMessages || l instanceof WebSocketTextListener ;
186
184
return this ;
187
185
}
188
186
@@ -192,7 +190,7 @@ public WebSocket removeWebSocketListener(WebSocketListener l) {
192
190
193
191
if (l instanceof WebSocketByteListener )
194
192
interestedInByteMessages = hasWebSocketByteListener ();
195
- else if (l instanceof WebSocketTextListener )
193
+ if (l instanceof WebSocketTextListener )
196
194
interestedInTextMessages = hasWebSocketTextListener ();
197
195
198
196
return this ;
You can’t perform that action at this time.
0 commit comments