-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Lines 56 to 70 in 3b97d1c
| func (c *UDPConn) Close() error { | |
| c.upnpPortMapping.close() | |
| close(c.closeChan) | |
| c.udpConnsMutex.RLock() | |
| for _, conn := range c.udpConns { | |
| conn.Close() | |
| } | |
| c.udpConnsMutex.RUnlock() | |
| c.closedWG.Wait() | |
| close(c.natEvents) | |
| close(c.datagrams) | |
| close(c.endpoints) | |
| close(c.errChan) | |
| return nil | |
| } |
Lines 177 to 180 in 3b97d1c
| select { | |
| case c.natEvents <- &info: | |
| default: | |
| } |
c.natEvents may be already closed, right?
For the dynamic added producer situation, I'm afraid WaitGroup is not enough.
Metadata
Metadata
Assignees
Labels
No labels