Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e88719 commit 5aae0ceCopy full SHA for 5aae0ce
wsnet/cache.go
@@ -65,6 +65,15 @@ func (d *DialerCache) evict() {
65
66
// If we're no longer signaling, the connection is pending close.
67
evict := dialer.rtc.SignalingState() == webrtc.SignalingStateClosed
68
+
69
+ // HACK: since the pion package can't reuse data channel IDs we need
70
+ // to terminate the connection once we approach the critical number.
71
+ // We're working on adding data channel ID reuse support upstream.
72
+ stats, ok := dialer.rtc.GetStats().GetConnectionStats(dialer.rtc)
73
+ if ok && stats.DataChannelsRequested > 32500 {
74
+ evict = true
75
+ }
76
77
if dialer.activeConnections() == 0 && time.Since(d.atime[key]) >= d.ttl {
78
evict = true
79
} else {
0 commit comments