fix panic: negative WaitGroup counter
avoid double wait group Done() Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
718ae42808
commit
f1d08f251f
@ -278,16 +278,13 @@ func (s *rpcServer) ServeConn(sock transport.Socket) {
|
|||||||
delete(sockets, id)
|
delete(sockets, id)
|
||||||
mtx.Unlock()
|
mtx.Unlock()
|
||||||
|
|
||||||
// once done serving signal we're done
|
|
||||||
if s.wg != nil {
|
|
||||||
s.wg.Done()
|
|
||||||
}
|
|
||||||
}(id, psock)
|
|
||||||
|
|
||||||
// signal we're done
|
// signal we're done
|
||||||
if s.wg != nil {
|
if s.wg != nil {
|
||||||
s.wg.Done()
|
s.wg.Done()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}(id, psock)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user