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

Terminate connections when they reach DC limit#443

Merged
deansheather merged 1 commit intomainfromkill-max-dc-conns
Sep 13, 2021
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletionswsnet/cache.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,6 +65,15 @@ func (d *DialerCache) evict() {

// If we're no longer signaling, the connection is pending close.
evict := dialer.rtc.SignalingState() == webrtc.SignalingStateClosed

// HACK: since the pion package can't reuse data channel IDs we need
// to terminate the connection once we approach the critical number.
// We're working on adding data channel ID reuse support upstream.
stats, ok := dialer.rtc.GetStats().GetConnectionStats(dialer.rtc)
if ok && stats.DataChannelsRequested > 32500 {
evict = true
}

if dialer.activeConnections() == 0 && time.Since(d.atime[key]) >= d.ttl {
evict = true
} else {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp