Closed hubertlepicki closed 3 years ago
Potentially related to #77?
Almost an year ago a guy has resolved by himself: http://joshsymonds.com/blog/2013/10/17/sidekiq-plus-houston-production-ready/ Maybe is maintainer consider the code safe, it will be cool to have the begin-rescue-5attemps code imported in the gem.
@micred I am using your solution, but I still have the problem when a token is invalid, it completely stops sending push notifications. The connection.open?
method still returns true, but this does not seem to be correct.
yeah, I know :-( To fix that problem (as a temporary workaround) I have added a "sleep 0.2" between each message sent.
That does not solve my problem. I already filter out old tokens but sometimes there is a token in my database that isn't valid and every notification after that token is not receiving a push message. :(
A lazy wrap with reset on CLOSE_WAIT connections (working on linux) https://gist.github.com/ferrous/d498971be300683c3bbd
This is not entirely Houston's fault, but the way Ruby Sockets work. When the server looses connection to Apple gateways, Houston knows nothing about it and connection#open? will still return true. Moreover, you seem to be able to write to such dead connection, yet nothing is delivered to Apple.
Underlying TCPConnection that is being opened to Apple is not working properly, yet we know nothing about it.
I have too little experience with Ruby TCP programming to solve it myself. But if someone can point me to right direction I could create a patch and pr.
Any ideas how to solve this?