File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/main/java/com/ning/http/client/providers/netty/ws Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -186,10 +186,8 @@ private boolean hasWebSocketTextListener() {
186
186
@ Override
187
187
public WebSocket addWebSocketListener (WebSocketListener l ) {
188
188
listeners .add (l );
189
- if (l instanceof WebSocketByteListener )
190
- interestedInByteMessages = true ;
191
- else if (l instanceof WebSocketTextListener )
192
- interestedInTextMessages = true ;
189
+ interestedInByteMessages = interestedInByteMessages || l instanceof WebSocketByteListener ;
190
+ interestedInTextMessages = interestedInTextMessages || l instanceof WebSocketTextListener ;
193
191
return this ;
194
192
}
195
193
@@ -199,7 +197,7 @@ public WebSocket removeWebSocketListener(WebSocketListener l) {
199
197
200
198
if (l instanceof WebSocketByteListener )
201
199
interestedInByteMessages = hasWebSocketByteListener ();
202
- else if (l instanceof WebSocketTextListener )
200
+ if (l instanceof WebSocketTextListener )
203
201
interestedInTextMessages = hasWebSocketTextListener ();
204
202
205
203
return this ;
You can’t perform that action at this time.
0 commit comments