add debug log for strange pooled packets
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m55s
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m55s
This commit is contained in:
@@ -240,7 +240,9 @@ func NewPacketQueue(connection net.Conn) *PacketQueue {
|
|||||||
queue.mu.Lock()
|
queue.mu.Lock()
|
||||||
for i, packet := range queue.Packets {
|
for i, packet := range queue.Packets {
|
||||||
if time.Since(packet.Added) < time.Second*5 {
|
if time.Since(packet.Added) < time.Second*5 {
|
||||||
queue.Packets = queue.Packets[i:]
|
stillInQueue := queue.Packets[i:]
|
||||||
|
log.Printf("DEBUG: Requeueing %v packets\n", stillInQueue)
|
||||||
|
queue.Packets = stillInQueue
|
||||||
packetQueue.Set(float64(len(queue.Packets)))
|
packetQueue.Set(float64(len(queue.Packets)))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -498,7 +500,9 @@ func (p *SyncedPool) addRemoteHost(address string, remote *RemoteHost) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *SyncedPool) AddRemote(address string) error {
|
func (p *SyncedPool) AddRemote(address string) error {
|
||||||
|
if address == "" || p.IsKnown(address) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
connection, err := net.Dial("tcp", fmt.Sprintf("%s:1338", address))
|
connection, err := net.Dial("tcp", fmt.Sprintf("%s:1338", address))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error connecting to remote %s: %v\n", address, err)
|
log.Printf("Error connecting to remote %s: %v\n", address, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user