Skip to content

ClientOption.TlsConfig.ServerName should not contain port number #78

Closed
@Andrey36652

Description

@Andrey36652

I'm trying to connect to wss://ws.okx.com:8443/ws/v5/public as a client and get error remote error: tls: handshake failure.
Reason is this line

gws/client.go

Line 59 in 5c407ad

option.TlsConfig.ServerName = URL.Host
should be

option.TlsConfig.ServerName = URL.Hostname()

because URL.Host includes port number, while URL.Hostname() does not

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions