From 4a3541ae6b6ce558108aeef67784a9563fdca50c Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Thu, 4 Apr 2024 11:30:04 -0400 Subject: [PATCH] Return errFake in mockClient used for tests If the test runs long enough then the RTX timer will send a Transaction and return a empty TransactionResult + nil err resulted in a crash --- internal/client/client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/client/client_test.go b/internal/client/client_test.go index ad306884..c544c8a5 100644 --- a/internal/client/client_test.go +++ b/internal/client/client_test.go @@ -26,7 +26,7 @@ func (c *mockClient) PerformTransaction(msg *stun.Message, to net.Addr, dontWait if c.performTransaction != nil { return c.performTransaction(msg, to, dontWait) } - return TransactionResult{}, nil + return TransactionResult{}, errFake } func (c *mockClient) OnDeallocated(relayedAddr net.Addr) {