Skip to content

Commit

Permalink
Update recws.go
Browse files Browse the repository at this point in the history
  • Loading branch information
loeffel-io authored Oct 19, 2020
1 parent 33a2857 commit dca1dfa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions recws.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit dca1dfa

Please sign in to comment.