From dca1dfa2dfbdfc62d861c203fbc71d7625f6c56f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20L=C3=B6ffel?= Date: Mon, 19 Oct 2020 18:08:20 +0200 Subject: [PATCH] Update recws.go --- recws.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recws.go b/recws.go index 94aec5c..e9b4463 100644 --- a/recws.go +++ b/recws.go @@ -54,8 +54,7 @@ type RecConn struct { httpResp *http.Response dialErr error dialer *websocket.Dialer - // if set to true, close stops dial reconnection - close chan (bool) + close chan (bool) *websocket.Conn } @@ -292,7 +291,9 @@ func (rc *RecConn) Dial(urlStr string, reqHeader http.Header) { log.Fatalf("Dial: %v", err) } + // Close channel rc.close = make(chan bool, 1) + // Config rc.setURL(urlStr) rc.setReqHeader(reqHeader)