mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-30 02:49:28 -07:00
frontend: fix recording of address family
This commit is contained in:
@@ -166,6 +166,7 @@ func (t *Frontend) announceRoute(w http.ResponseWriter, r *http.Request, _ httpr
|
||||
WriteError(w, err)
|
||||
return
|
||||
}
|
||||
af = new(bittorrent.AddressFamily)
|
||||
*af = req.IP.AddressFamily
|
||||
|
||||
resp, err := t.logic.HandleAnnounce(context.Background(), req)
|
||||
@@ -213,6 +214,7 @@ func (t *Frontend) scrapeRoute(w http.ResponseWriter, r *http.Request, _ httprou
|
||||
WriteError(w, ErrInvalidIP)
|
||||
return
|
||||
}
|
||||
af = new(bittorrent.AddressFamily)
|
||||
*af = req.AddressFamily
|
||||
|
||||
resp, err := t.logic.HandleScrape(context.Background(), req)
|
||||
|
||||
@@ -232,6 +232,7 @@ func (t *Frontend) handleRequest(r Request, w ResponseWriter) (actionName string
|
||||
WriteError(w, txID, err)
|
||||
return
|
||||
}
|
||||
af = new(bittorrent.AddressFamily)
|
||||
*af = req.IP.AddressFamily
|
||||
|
||||
var resp *bittorrent.AnnounceResponse
|
||||
@@ -264,6 +265,7 @@ func (t *Frontend) handleRequest(r Request, w ResponseWriter) (actionName string
|
||||
WriteError(w, txID, ErrInvalidIP)
|
||||
return
|
||||
}
|
||||
af = new(bittorrent.AddressFamily)
|
||||
*af = req.AddressFamily
|
||||
|
||||
var resp *bittorrent.ScrapeResponse
|
||||
|
||||
Reference in New Issue
Block a user