Fixing error where connection was re-established incorrectly
This commit is contained in:
@ -46,6 +46,10 @@ func (w *Websocket) Init(endpoint string, options *transport.Options) error {
|
||||
|
||||
w.stopCh = make(chan error)
|
||||
w.conn, _, err = websocket.DefaultDialer.Dial(endpoint, options.Headers)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = w.conn.UnderlyingConn().(*tls.Conn).NetConn().(*net.TCPConn).SetKeepAlive(true)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user