From bf5dd402fe4d3b161d791d83d139d7d36e7e8b8b Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Thu, 4 Apr 2024 10:30:19 -0400 Subject: [PATCH] Sean debugging TODO --- client.go | 1 + internal/client/allocation.go | 1 + internal/client/client_test.go | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 9d32a22d..96a872dc 100644 --- a/client.go +++ b/client.go @@ -439,6 +439,7 @@ func (c *Client) PerformTransaction(msg *stun.Message, to net.Addr, ignoreResult } res := tr.WaitForResult() + fmt.Println("PerformTransaction", res) if res.Err != nil { return res, res.Err } diff --git a/internal/client/allocation.go b/internal/client/allocation.go index 49b09b63..540c7fd2 100644 --- a/internal/client/allocation.go +++ b/internal/client/allocation.go @@ -76,6 +76,7 @@ func (a *allocation) refreshAllocation(lifetime time.Duration, dontWait bool) er a.log.Debugf("Send refresh request (dontWait=%v)", dontWait) trRes, err := a.client.PerformTransaction(msg, a.serverAddr, dontWait) + fmt.Println("refreshAllocation", trRes, err, dontWait) if err != nil { return fmt.Errorf("%w: %s", errFailedToRefreshAllocation, err.Error()) } 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) {