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

Bad heartbeat causes panic #23

Closed
maxgarvey opened this issue Apr 23, 2015 · 2 comments
Closed

Bad heartbeat causes panic #23

maxgarvey opened this issue Apr 23, 2015 · 2 comments
Labels

Comments

@maxgarvey
Copy link
Contributor

We had a service that was being disrupted by a panic on the heartbeating logic:

Heartbeat Send Failure: write tcp 172.22.0.88:61613: connection reset by peer
panic: non-positive interval for NewTicker

goroutine 351 [running]:
runtime.panic(0x7746c0, 0xc2091ce2f0)
    /usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
time.NewTicker(0xffffffffcde10e9d, 0x62082dc)
    /usr/local/go/src/pkg/time/tick.go:23 +0xd8
github.com/gmallard/stompngo.(*Connection).sendTicker(0xc2080ba500)
    /srv/teamcity/work/7d0e7d4c05ce72c/src/github.com/monsooncommerce/last-offer-event-storage-service/Godeps/_workspace/src/github.com/gmallard/stompngo/heartbeats.go:122 +0x7b
created by github.com/gmallard/stompngo.(*Connection).initializeHeartBeats
    /srv/teamcity/work/7d0e7d4c05ce72c/src/github.com/monsooncommerce/last-offer-event-storage-service/Godeps/_workspace/src/github.com/gmallard/stompngo/heartbeats.go:100 +0x9b4

the timing bounds set in the previous heartbeat were creating a negative duration which caused a panic.

I have submitted a pull request that solves this by limiting the outstanding heartbeats to 10, and refactoring the time interval logic:
#22

@gmallard
Copy link
Owner

Closed: f6f1061

@gmallard
Copy link
Owner

gmallard commented Jul 6, 2016

If you are still using the stompngo package please try the current v.1.0.2 tag.

Tag information:

b1f1d96 refs/tags/v1.0.2

Document that version number in any issue reports.

Thanks for the support.

Guy

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

2 participants