chore: minor tweaks
This commit is contained in:
parent
9e9abb10c8
commit
b3e94b6e06
|
@ -201,7 +201,7 @@ mainloop:
|
|||
// can do.
|
||||
continue mainloop
|
||||
}
|
||||
s.Heartbeat(packet.Peer, packetData)
|
||||
go s.Heartbeat(packet.Peer, packetData)
|
||||
case proto.ROUTE_RESPONSE:
|
||||
packetData := proto.PacketRes{}
|
||||
err = proto.Unmarshal(&packetData, peerPublicKey, packet.Data)
|
||||
|
@ -210,7 +210,7 @@ mainloop:
|
|||
// can do.
|
||||
continue mainloop
|
||||
}
|
||||
s.Response(packet.Peer, packetData)
|
||||
go s.Response(packet.Peer, packetData)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ func (pm *manager) Start() {
|
|||
// Read the payload from request body.
|
||||
data, err := io.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
w.WriteHeader(400)
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ func (pm *manager) Start() {
|
|||
}
|
||||
|
||||
// Respond so the requester doesn't have to wait for the queue to empty.
|
||||
w.WriteHeader(200)
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
|
||||
// Add to the queue.
|
||||
pm.rxq <- p
|
||||
|
|
Loading…
Reference in New Issue
Block a user