summaryrefslogtreecommitdiffhomepage
path: root/device/receive.go
diff options
context:
space:
mode:
Diffstat (limited to 'device/receive.go')
-rw-r--r--device/receive.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/device/receive.go b/device/receive.go
index 9f6b363..1182246 100644
--- a/device/receive.go
+++ b/device/receive.go
@@ -98,7 +98,7 @@ func (device *Device) RoutineReceiveIncoming(recv conn.ReceiveFunc) {
if errors.Is(err, net.ErrClosed) {
return
}
- device.log.Verbosef("Routine: receive incoming %s - failed to receive packet: %v", recvName, err)
+ device.log.Verbosef("Failed to receive %s packet: %v", recvName, err)
if neterr, ok := err.(net.Error); ok && !neterr.Temporary() {
return
}
@@ -203,11 +203,11 @@ func (device *Device) RoutineReceiveIncoming(recv conn.ReceiveFunc) {
}
}
-func (device *Device) RoutineDecryption() {
+func (device *Device) RoutineDecryption(id int) {
var nonce [chacha20poly1305.NonceSize]byte
- defer device.log.Verbosef("Routine: decryption worker - stopped")
- device.log.Verbosef("Routine: decryption worker - started")
+ defer device.log.Verbosef("Routine: decryption worker %d - stopped", id)
+ device.log.Verbosef("Routine: decryption worker %d - started", id)
for elem := range device.queue.decryption.c {
// split message into fields
@@ -234,12 +234,12 @@ func (device *Device) RoutineDecryption() {
/* Handles incoming packets related to handshake
*/
-func (device *Device) RoutineHandshake() {
+func (device *Device) RoutineHandshake(id int) {
defer func() {
- device.log.Verbosef("Routine: handshake worker - stopped")
+ device.log.Verbosef("Routine: handshake worker %d - stopped", id)
device.queue.encryption.wg.Done()
}()
- device.log.Verbosef("Routine: handshake worker - started")
+ device.log.Verbosef("Routine: handshake worker %d - started", id)
for elem := range device.queue.handshake.c {