From: Matt Joiner Date: Mon, 9 Sep 2024 10:53:29 +0000 (+1000) Subject: Fix panic using web RTC RemoteAddr directly from conn X-Git-Tag: v1.57.0 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=b80f6b65f205ab03d3a5286da0404c95d29eaa9f;p=btrtrc.git Fix panic using web RTC RemoteAddr directly from conn Fixes #972. --- diff --git a/torrent.go b/torrent.go index 8bd34dbc..4749c8a8 100644 --- a/torrent.go +++ b/torrent.go @@ -2204,7 +2204,7 @@ func (t *Torrent) statsLocked() (ret TorrentStats) { func (t *Torrent) numTotalPeers() int { peers := make(map[string]struct{}) for conn := range t.conns { - ra := conn.conn.RemoteAddr() + ra := conn.RemoteAddr if ra == nil { // It's been closed and doesn't support RemoteAddr. continue