Skip to content

Commit 65c58c3

Browse files
committed
Log dTLS transport state
1 parent b294481 commit 65c58c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

peer/conn.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ func (c *Conn) init() error {
220220
c.opts.Logger.Debug(context.Background(), "signaling state updated",
221221
slog.F("state", signalState))
222222
})
223+
c.rtc.SCTP().Transport().OnStateChange(func(dtlsTransportState webrtc.DTLSTransportState) {
224+
c.opts.Logger.Debug(context.Background(), "dtls transport state updated",
225+
slog.F("state", dtlsTransportState))
226+
})
223227
c.rtc.OnICECandidate(func(iceCandidate *webrtc.ICECandidate) {
224228
if iceCandidate == nil {
225229
return

0 commit comments

Comments
 (0)