-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
PushoverHandler cannot send multiple/ concurrent messages in quick succession #146
Comments
Could you try adding this in the original PushoverHandler and see if it fixes it?
This would close the socket after every call instead of keeping it open. Another thing to try would be to add On a sidenote, doesn't the pushover api allow sending a message to more than one person at once? That would be a better option :) |
I'll try those two suggestions tomorrow and let you know if they work out. On 14 January 2013 18:24, Jordi Boggiano notifications@github.com wrote:
|
Using the setPersistent() method doesn't work, as only the first message is received. Calling closeSocket() works, but only for the pushover.net application's owner because the PushOver API only allows messages to other users than the application's owner when connecting over SSL. So, the fix for PushoverHandler.php:37 is:
instead of:
So the solution to our specific problem is to close the socket on every push while connecting over SSL. Be aware that setPersistent() and SSL might be mutually exclusive... |
OK thanks for trying. I think using ssl + closeSocket() is a better approach than curl because curl isn't always available (neither is openssl, but I think it's more common). If you would like to submit a pull request with this approach it'd be great. If you get any news from their side about multi-user-push please update this issue. |
… connection after sending a message to PushOver. Solves Seldaek#146: When sending messages in rapid succession to pushover.net only the first one is sent. The SSL option is needed when sending messages to users that are not the pushover.net app owner; pushover.net doesn't accept those messages over plain HTTP.
Closing this, see #148 |
… connection after sending a message to PushOver. Solves Seldaek#146: When sending messages in rapid succession to pushover.net only the first one is sent. The SSL option is needed when sending messages to users that are not the pushover.net app owner; pushover.net doesn't accept those messages over plain HTTP.
Hi!
We use the PushoverHandler, but found that sending messages to multiple users failed:
User 1 always receives the message, user 2 never receives the message.
Upon investigation of the problem, it looks like the stream is never closed, whilst the second call creates a new stream. Perhaps Pushover.net doesn't like this?
We found that posting the message using cURL solved the problem (being sure to curl_close() the channel. Here's the code we wrote to do so:
Perhaps closing the stream connection in the original handler code also solves this problem, but we didn't test that.
Regards,
Alex
The text was updated successfully, but these errors were encountered: