forresthopkinsa / StompProtocolAndroid

Websockets on Android
MIT License
11 stars 4 forks source link

Duplicate messages on re-connect #4

Closed stairs closed 6 years ago

stairs commented 6 years ago

It appears that we just don't unsubscribe from messages() on disconnect(). Therefore each new connect() will result in callSubscribers() executed as many times as connect() was called.

forresthopkinsa commented 6 years ago

Good catch! I don't know how I haven't experienced this myself. Anyway, we can work together on a PR if you want, or I can work on that.

If you want to do it, you don't need any special permissions; you can open a PR even if you're not a repository contributor.

forresthopkinsa commented 6 years ago

Problem solved. I'll keep my eye on this issue and re-open if it crops up again. Thanks for the help @stairs !!