send: better debug message for failed data packet
This commit is contained in:
parent
6b3b1c3b91
commit
2e13b7b0fb
3
send.go
3
send.go
@ -521,6 +521,7 @@ func (peer *Peer) RoutineSequentialSender() {
|
|||||||
device := peer.device
|
device := peer.device
|
||||||
|
|
||||||
logDebug := device.log.Debug
|
logDebug := device.log.Debug
|
||||||
|
logError := device.log.Error
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
logDebug.Println(peer, "- Routine: sequential sender - stopped")
|
logDebug.Println(peer, "- Routine: sequential sender - stopped")
|
||||||
@ -557,7 +558,7 @@ func (peer *Peer) RoutineSequentialSender() {
|
|||||||
err := peer.SendBuffer(elem.packet)
|
err := peer.SendBuffer(elem.packet)
|
||||||
device.PutMessageBuffer(elem.buffer)
|
device.PutMessageBuffer(elem.buffer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logDebug.Println("Failed to send authenticated packet to peer", peer)
|
logError.Println(peer, "- Failed to send data packet", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
atomic.AddUint64(&peer.stats.txBytes, length)
|
atomic.AddUint64(&peer.stats.txBytes, length)
|
||||||
|
Loading…
Reference in New Issue
Block a user