recws icon indicating copy to clipboard operation
recws copied to clipboard

Reconnecting WebSocket is a websocket client based on gorilla/websocket that will automatically reconnect if the connection is dropped and keeps the connection alive - thread safe!

Results 17 recws issues
Sort by recently updated
recently updated
newest added

This pr fix possibility to new connect while close in process Fixes https://github.com/recws-org/recws/issues/42 and maybe https://github.com/recws-org/recws/issues/20

simple patch for keepalive on the same host

```go ticker = time.NewTicker(rc.getKeepAliveTimeout()) ... if err := rc.writeControlPingMessage(); err != nil { log.Println(err) } rc.getKeepAliveTimeout() { rc.CloseAndReconnect() return } ``` Shouldn't `time.Since(keepAliveResponse.getLastResponse())` always be greater than keepAliveTimeout because it's...

If you're blocking on `ReadMessage()`, while the goroutine for `KeepAliveTimeout` fires a `closeAndReconnect`, the `ReadMessage` will fire a second `closeAndReconnect`. This causes more and more connections to be created and...

bug
help wanted

Using the basic example, the code below will flood the console and cause 100% CPU usage on a single core; ```go if !ws.IsConnected() { log.Printf("Websocket disconnected %s", ws.GetURL()) continue }...

``` // CloseAndReconnect will try to reconnect. func (rc *RecConn) CloseAndReconnect() { rc.Close() go rc.connect() } ``` the `Close()` function send to the `close` chan `rc.close

I was in need to: 1. Cancel dial -> added context.Context 2. Close connection without it trying to reconnect -> added CloseForever() Some of you or your users might need...

Dial should not unconditionally sleep for that amount of time. If the conection succeeded via the asynchronous goroutine, we can simply return early. This is particularly helpful in situations where...

Hi, I encountered the following error in my application: `panic: runtime error: invalid memory address or nil pointer dereference[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7d96d0]goroutine 59856 [running]:github.com/gorilla/websocket.(*Conn).SetPongHandler(0x0, 0xc003712960) /go/pkg/mod/github.com/gorilla/[email protected]/conn.go:1160 +0x20github.com/recws-org/recws.(*RecConn).keepAlive(0x1399a00)...