Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commitf399ded

Browse files
committed
Terminate connections when they reach DC limit (#443)
(cherry picked from commita8ef208)(cherry picked from commit5aae0ce)
1 parent177839f commitf399ded

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎wsnet/cache.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ func (d *DialerCache) evict() {
6565

6666
// If we're no longer signaling, the connection is pending close.
6767
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+
ifok&&stats.DataChannelsRequested>32500 {
74+
evict=true
75+
}
76+
6877
ifdialer.activeConnections()==0&&time.Since(d.atime[key])>=d.ttl {
6978
evict=true
7079
}else {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp