summaryrefslogtreecommitdiffhomepage
path: root/send.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-16 16:05:21 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-16 16:05:36 +0200
commit2e13b7b0fb1a6076c729acfc7055a96ae53f0a12 (patch)
treecbd0450c71f574faa038d925812809e4547aa805 /send.go
parent6b3b1c3b918fcb9bbf1d876ad6d58c38932a2469 (diff)
send: better debug message for failed data packet
Diffstat (limited to 'send.go')
-rw-r--r--send.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/send.go b/send.go
index 311facc..0e03669 100644
--- a/send.go
+++ b/send.go
@@ -521,6 +521,7 @@ func (peer *Peer) RoutineSequentialSender() {
device := peer.device
logDebug := device.log.Debug
+ logError := device.log.Error
defer func() {
logDebug.Println(peer, "- Routine: sequential sender - stopped")
@@ -557,7 +558,7 @@ func (peer *Peer) RoutineSequentialSender() {
err := peer.SendBuffer(elem.packet)
device.PutMessageBuffer(elem.buffer)
if err != nil {
- logDebug.Println("Failed to send authenticated packet to peer", peer)
+ logError.Println(peer, "- Failed to send data packet", err)
continue
}
atomic.AddUint64(&peer.stats.txBytes, length)