File tree 2 files changed +3
-5
lines changed
2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -264,10 +264,8 @@ func (c *client) Connect() Token {
264
264
c .persist .Reset ()
265
265
}
266
266
267
+ c .workers .Add (4 )
267
268
go errorWatch (c )
268
-
269
- // Do not start incoming until resume has completed
270
- c .workers .Add (3 )
271
269
go alllogic (c )
272
270
go outgoing (c )
273
271
go incoming (c )
@@ -359,9 +357,8 @@ func (c *client) reconnect() {
359
357
go c .options .OnConnect (c )
360
358
}
361
359
360
+ c .workers .Add (4 )
362
361
go errorWatch (c )
363
-
364
- c .workers .Add (3 )
365
362
go alllogic (c )
366
363
go outgoing (c )
367
364
go incoming (c )
Original file line number Diff line number Diff line change @@ -320,6 +320,7 @@ func alllogic(c *client) {
320
320
}
321
321
322
322
func errorWatch (c * client ) {
323
+ defer c .workers .Done ()
323
324
select {
324
325
case <- c .stop :
325
326
WARN .Println (NET , "errorWatch stopped" )
You can’t perform that action at this time.
0 commit comments