Wait for closeWaitChannel in OnClose hook.

master
Icedream 2019-07-11 14:51:32 +02:00
parent 0fb483d493
commit ebf294c273
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
1 changed files with 1 additions and 5 deletions

View File

@ -144,11 +144,7 @@ func (conn *DataChannel) init() {
})
conn.dataChannel.OnClose(func() {
select {
case conn.closeWaitChannel <- nil:
default:
}
conn.closeWaitChannel <- nil
conn.triggerClose()
})
}