Skip to content

Commit

Permalink
Fix panic using web RTC RemoteAddr directly from conn
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix committed Sep 9, 2024
1 parent 2a77ecd commit 23388bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torrent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 23388bb

Please sign in to comment.