From 4d10a30c45556527df309f567eede010652bb854 Mon Sep 17 00:00:00 2001 From: Hugo Arregui Date: Wed, 24 Apr 2019 18:02:51 -0300 Subject: [PATCH] Fix handleInboundBindingSuccess bug Some transactions were lost because a small bug in indexing --- agent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent.go b/agent.go index cfcdc16..4b14666 100644 --- a/agent.go +++ b/agent.go @@ -624,7 +624,7 @@ func (a *Agent) handleInboundControlling(m *stun.Message, localCandidate, remote func (a *Agent) handleInboundBindingSuccess(id []byte) bool { for i := range a.pendingBindingRequests { if bytes.Equal(a.pendingBindingRequests[i], id) { - a.pendingBindingRequests = append(a.pendingBindingRequests[:i], a.pendingBindingRequests[:i+1]...) + a.pendingBindingRequests = append(a.pendingBindingRequests[:i], a.pendingBindingRequests[i+1:]...) return true } }