WebRtcServer destructor must first close its WebRtcTransports and then the UDP sockets and TCP servers (so also its TCP connections). Otherwise those WebRtcTransports will try to send DTLS Close Alert on an already closed/freed UdpSocketHandle or TcpConnectionHandle.
Fixes #1388
Details
WebRtcServer
destructor must first close itsWebRtcTransports
and then the UDP sockets and TCP servers (so also its TCP connections). Otherwise thoseWebRtcTransports
will try to send DTLS Close Alert on an already closed/freedUdpSocketHandle
orTcpConnectionHandle
.Steps to verify
WebRtcServer
running and a client connected.webRtcServer.close()
.