summaryrefslogtreecommitdiffhomepage
path: root/device/device.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-05-07 12:21:21 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-05-07 12:21:21 +0200
commit7121927b8743a9177fda6ddbdfcf9ccd97989417 (patch)
tree1d8f1eff75d4dd3f8caa54f6c270a9918cc4e600 /device/device.go
parent326aec10afd9a86e4ad41dcd057d18c9c0ce7097 (diff)
device: add ID to repeated routines
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device/device.go')
-rw-r--r--device/device.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/device/device.go b/device/device.go
index a635e68..86f519a 100644
--- a/device/device.go
+++ b/device/device.go
@@ -304,9 +304,9 @@ func NewDevice(tunDevice tun.Device, bind conn.Bind, logger *Logger) *Device {
device.state.stopping.Wait()
device.queue.encryption.wg.Add(cpus) // One for each RoutineHandshake
for i := 0; i < cpus; i++ {
- go device.RoutineEncryption()
- go device.RoutineDecryption()
- go device.RoutineHandshake()
+ go device.RoutineEncryption(i + 1)
+ go device.RoutineDecryption(i + 1)
+ go device.RoutineHandshake(i + 1)
}
device.state.stopping.Add(1) // RoutineReadFromTUN