add waitGroups for waiting finish all connects #131
							
								
								
									
										3
									
								
								tcp.go
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tcp.go
									
									
									
									
									
								
							@@ -430,13 +430,12 @@ func (h *tcpServer) gracefulStop() {
 | 
				
			|||||||
	done := make(chan struct{})
 | 
						done := make(chan struct{})
 | 
				
			||||||
	go func() {
 | 
						go func() {
 | 
				
			||||||
		h.opts.Wait.Wait()
 | 
							h.opts.Wait.Wait()
 | 
				
			||||||
		done <- struct{}{}
 | 
							close(done)
 | 
				
			||||||
	}()
 | 
						}()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	select {
 | 
						select {
 | 
				
			||||||
	case <-tm.C:
 | 
						case <-tm.C:
 | 
				
			||||||
	case <-done:
 | 
						case <-done:
 | 
				
			||||||
		close(done)
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user