Skip to content

Commit e69ea10

Browse files
ncabatoffjohnweldon
authored andcommitted
Prevent negative waitgroup panic by Adding first. (#237)
1 parent caa044a commit e69ea10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

conn.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ func NewConn(conn net.Conn, isTLS bool) *Conn {
191191

192192
// Start initializes goroutines to read responses and process messages
193193
func (l *Conn) Start() {
194+
l.wgClose.Add(1)
194195
go l.reader()
195196
go l.processMessages()
196-
l.wgClose.Add(1)
197197
}
198198

199199
// IsClosing returns whether or not we're currently closing.

0 commit comments

Comments
 (0)