Skip to content

Commit

Permalink
fix panic in udp transport
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Sep 30, 2023
1 parent d2e7e4d commit 10d215b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/tracker/udptracker/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (t *Transport) Run() {
connections[req.dest] = conn
trx, err := beginTransaction(conn)
if err != nil {
trx.request.SetResponse(nil, err)
conn.SetResponse(nil, err)
} else {
go resolveDestinationAndConnect(trx, req.dest, udpConn, t.dnsTimeout, t.blocklist, connectDone, t.closeC)
}
Expand All @@ -139,7 +139,7 @@ func (t *Transport) Run() {
req.ConnectionID = conn.id
trx, err := beginTransaction(req)
if err != nil {
trx.request.SetResponse(nil, err)
req.SetResponse(nil, err)
} else {
go retryTransaction(trx, udpConn, conn.addr)
}
Expand Down

0 comments on commit 10d215b

Please sign in to comment.