Skip to content

Commit 7a70b80

Browse files
committed
Remove dead code
Motivation: We used to have a double lookup for Connection header, based on case. But HttpHeaders lookup is case insensitive and I forgot to remove this code that now performs the lookup twice. Modification: Remove dead code Result: Dead code removed
1 parent 916b8aa commit 7a70b80

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

client/src/main/java/org/asynchttpclient/netty/handler/WebSocketHandler.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ public void call() throws Exception {
8787
boolean validStatus = response.status().equals(SWITCHING_PROTOCOLS);
8888
boolean validUpgrade = response.headers().get(UPGRADE) != null;
8989
String connection = response.headers().get(CONNECTION);
90-
if (connection == null)
91-
connection = response.headers().get(CONNECTION);
9290
boolean validConnection = HttpHeaderValues.UPGRADE.contentEqualsIgnoreCase(connection);
9391
boolean statusReceived = handler.onStatusReceived(status) == State.CONTINUE;
9492

0 commit comments

Comments
 (0)