Properly close DummyTUN to avoid deadlock in TestNoiseHandshake

License: MIT
Signed-off-by: Filippo Valsorda <[email protected]>
This commit is contained in:
Filippo Valsorda
2018-05-21 20:20:13 +02:00
committed by Jason A. Donenfeld
parent 1c666576d5
commit 7bdc5eb54e
3 changed files with 12 additions and 1 deletions
+1
View File
@@ -58,6 +58,7 @@ func TestNoiseHandshake(t *testing.T) {
packet := make([]byte, 0, 256)
writer := bytes.NewBuffer(packet)
err = binary.Write(writer, binary.LittleEndian, msg1)
assertNil(t, err)
peer := dev2.ConsumeMessageInitiation(msg1)
if peer == nil {
t.Fatal("handshake failed at initiation message")