mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-15 17:11:55 -07:00
Server.BackendCon renamed Server.BackendConn
This commit is contained in:
+1
-1
@@ -243,7 +243,7 @@ func (s Server) serveAnnounce(w http.ResponseWriter, r *http.Request) {
|
||||
delta.Uploaded = uint64(float64(rawDeltaUp) * user.UpMultiplier * torrent.UpMultiplier)
|
||||
delta.Downloaded = uint64(float64(rawDeltaDown) * user.DownMultiplier * torrent.DownMultiplier)
|
||||
|
||||
s.backendCon.RecordAnnounce(delta)
|
||||
s.backendConn.RecordAnnounce(delta)
|
||||
}
|
||||
|
||||
func (s Server) validateAnnounceQuery(r *http.Request) (compact bool, numWant int, infohash, peerID, event, ip string, port, uploaded, downloaded, left uint64, err error) {
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ type Server struct {
|
||||
conf *config.Config
|
||||
listener *stoppableListener.StoppableListener
|
||||
trackerPool tracker.Pool
|
||||
backendCon backend.Conn
|
||||
backendConn backend.Conn
|
||||
|
||||
startTime time.Time
|
||||
|
||||
@@ -55,7 +55,7 @@ func New(conf *config.Config) (*Server, error) {
|
||||
s := &Server{
|
||||
conf: conf,
|
||||
trackerPool: trackerPool,
|
||||
backendCon: backendConn,
|
||||
backendConn: backendConn,
|
||||
Server: http.Server{
|
||||
Addr: conf.Addr,
|
||||
ReadTimeout: conf.ReadTimeout.Duration,
|
||||
|
||||
Reference in New Issue
Block a user