From a1667f5cb7e8da266037457461db5b61c6cffc9b Mon Sep 17 00:00:00 2001 From: Yutaka Takeda Date: Wed, 17 Jul 2019 01:47:47 -0700 Subject: [PATCH] Fixed unexpected goroutine error TURN client's loc conn was not closed when agent.Close() was called Relates to pion/webrtc#740 --- gather.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gather.go b/gather.go index b9c830b..f3417d6 100644 --- a/gather.go +++ b/gather.go @@ -347,9 +347,8 @@ func (a *Agent) gatherCandidatesRelay(urls []*URL) error { RelAddr: laddr.IP.String(), RelPort: laddr.Port, OnClose: func() error { - err2 := relayConn.Close() client.Close() - return err2 + return locConn.Close() }, } candidate, err := NewCandidateRelay(&relayConfig)