Merge pull request #681 from unistack-org/fix_wg

fix panic: negative WaitGroup counter
This commit is contained in:
Asim Aslam 2019-08-19 12:06:45 +01:00 committed by GitHub
commit ac2a5a04a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 // signal we're done
if s.wg != nil { if s.wg != nil {
s.wg.Done() s.wg.Done()
} }
}(id, psock) }(id, psock)
// signal we're done
if s.wg != nil {
s.wg.Done()
}
} }
} }