Wait for closeWaitChannel in OnClose hook.
parent
0fb483d493
commit
ebf294c273
|
@ -144,11 +144,7 @@ func (conn *DataChannel) init() {
|
|||
})
|
||||
|
||||
conn.dataChannel.OnClose(func() {
|
||||
select {
|
||||
case conn.closeWaitChannel <- nil:
|
||||
default:
|
||||
}
|
||||
|
||||
conn.closeWaitChannel <- nil
|
||||
conn.triggerClose()
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue