We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI reported build error (log shown below)
Build and tests to pass
=== RUN TestServer/simple panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x68771e] goroutine 32 [running]: time.(*Timer).Stop(...) /home/travis/.gimme/versions/go1.12.7.linux.amd64/src/time/sleep.go:74 github.com/pion/turn/internal/client.(*Transaction).StopRtxTimer(0xc0001dc070) /home/travis/gopath/src/github.com/pion/turn/internal/client/transaction.go:75 +0xbe github.com/pion/turn.(*Client).handleSTUNMessage(0xc0001b0240, 0xc0001fc000, 0x28, 0xffff, 0x998060, 0xc00020e000, 0xc00020e000, 0x0) /home/travis/gopath/src/github.com/pion/turn/client.go:474 +0x99c github.com/pion/turn.(*Client).HandleInbound(0xc0001b0240, 0xc0001fc000, 0x28, 0xffff, 0x998060, 0xc00020e000, 0xc00020e000, 0x0, 0x0) /home/travis/gopath/src/github.com/pion/turn/client.go:400 +0x63c github.com/pion/turn.(*Client).Listen.func1(0xc0001b0240) /home/travis/gopath/src/github.com/pion/turn/client.go:173 +0x18d created by github.com/pion/turn.(*Client).Listen /home/travis/gopath/src/github.com/pion/turn/client.go:164 +0x1e1 FAIL github.com/pion/turn 1.390s
This never happens on my PC, but I found a typo in the code. The nil check was done against a wrong variable:
// StopRtxTimer stop the transaction timer func (t *Transaction) StopRtxTimer() { t.mutex.Lock() defer t.mutex.Unlock() if t != nil { // <----------------- :( this should be t.time t.timer.Stop() } }
The text was updated successfully, but these errors were encountered:
Fix nil possible pointer dereference
01853eb
Resolves #78
62b9d71
Successfully merging a pull request may close this issue.
Your environment.
What did you do?
CI reported build error (log shown below)
What did you expect?
Build and tests to pass
What happened?
This never happens on my PC, but I found a typo in the code. The nil check was done against a wrong variable:
The text was updated successfully, but these errors were encountered: