Merge pull request #681 from unistack-org/fix_wg
fix panic: negative WaitGroup counter
This commit is contained in:
		| @@ -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) | ||||||
|  |  | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user