recws
recws copied to clipboard
CloseAndReconnect() only Close but doesn't Reconnect
// CloseAndReconnect will try to reconnect.
func (rc *RecConn) CloseAndReconnect() {
rc.Close()
go rc.connect()
}
the Close()
function send to the close
chan
rc.close <- true
connect()
will return if it receives from close
chan
func (rc *RecConn) connect() {
b := rc.getBackoff()
rand.Seed(time.Now().UTC().UnixNano())
for {
select {
case <-rc.close:
return
....
in the end calling connect()
right after Close()
will not work.
Am I missing something here or it is a bug?
@loeffel-io Hi is this repo still actively maintained?
My issue is open for more than half a year without any reaction. This repo is dead I guess :sad:
hey guys, its not dead - just have no time for it rn - PRs are welcome :-)
hey guys, its not dead - just have no time for it rn - PRs are welcome :-)
Glad to hear :-)
hey guys, its not dead - just have no time for it rn - PRs are welcome :-)
@loeffel-io Hi Please verify if the stated behaviour is possible at least. Then people can work around it before a fix. thank you