Skip to content

Commit ed73b32

Browse files
authored
Merge pull request TooTallNate#683 from xcelder/patch-1
Update WebSocketClient.java
2 parents c08be4e + 8a9df49 commit ed73b32

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/java_websocket/client/WebSocketClient.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,10 @@ private void sendHandshake() throws InvalidHandshakeException {
434434
if( part2 != null )
435435
path += '?' + part2;
436436
int port = getPort();
437-
String host = uri.getHost() + ( port != WebSocket.DEFAULT_PORT ? ":" + port : "" );
437+
String host = uri.getHost() + (
438+
(port != WebSocket.DEFAULT_PORT && port != WebSocket.DEFAULT_WSS_PORT)
439+
? ":" + port
440+
: "" );
438441

439442
HandshakeImpl1Client handshake = new HandshakeImpl1Client();
440443
handshake.setResourceDescriptor( path );

0 commit comments

Comments
 (0)