Skip to content
New issue

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

tally stop panics on source close #20

Open
SpComb opened this issue Feb 3, 2017 · 0 comments
Open

tally stop panics on source close #20

SpComb opened this issue Feb 3, 2017 · 0 comments
Labels

Comments

@SpComb
Copy link
Member

SpComb commented Feb 3, 2017

When shutting down the tally:

2017/02/03 23:54:18 Tally: stopping...
2017/02/03 23:54:18 tally: Update: sources=1 inputs=3 outputs=3 tallys=3
2017/02/03 23:54:18 xmlClient.writer: close
2017/02/03 23:54:18 xmlClient.read: read tcp4 192.168.56.1:39402->192.168.56.10:9876: use of closed network connection
2017/02/03 23:54:18 tally:Source 192.168.56.10: closed
panic: close of closed channel

goroutine 9 [running]:
panic(0x803c40, 0xc82023a080)
        /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6
github.com/qmsk/e2/client.(*XMLClient).Close(0xc820114720)
        /home/build/go/src/github.com/qmsk/e2/client/xml.go:314 +0x30
github.com/qmsk/e2/tally.Source.run(0x0, 0x0, 0xa3f792, 0x4, 0xa3f80e, 0x4, 0xa3f7d1, 0x4, 0x2540be400, 0x100, ...)
        /home/build/go/src/github.com/qmsk/e2/tally/source.go:76 +0x2ae
created by github.com/qmsk/e2/tally.newSource
        /home/build/go/src/github.com/qmsk/e2/tally/source.go:35 +0x204

This is

  • tally:Tally.Stop() -> close(tally.closeChan)
  • tally:Tally.Run() -> tally:Source.close() -> client:XMLClient.Close()
  • tally:Source.run() -> client:XMLClient.Close() -> panic
@SpComb SpComb added the bug label Feb 3, 2017
@SpComb SpComb changed the title tally source close of closed channel tally stop panics on source close Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant