-
Notifications
You must be signed in to change notification settings - Fork 136
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
Warning(openssladapter.cc:407): OpenSSLAdapter::Error(SSL_write, -1) #98
Comments
Ping fails to get a response so it calls disconnect. Which phone are you on? My personal guess is what seemed like it worked
|
iOS - Single login has always produced 3 pings. Not sure why. Single login that is left unattended for a longer duration results in that error mentioned. The same was happening when the app would go to the background, so I "fixed" that by disconnection prior to going in the background and logging back in once the app resumes. Though if an app never goes to the background and just chills for a bit, this error occurs.Though I think when the phone goes inactive, the connect is probably dropped by Apple. If anything I want it to fail gracefully. So I'm moving over some of your ping task commit code and see if that resolves. |
I'll run the code from the webrtc repo directly and see what it yields. |
Ah on apple you need to implement the always open socket for VoIP apps. Example of socket linked below. I think some of the changes from @hailg http://stackoverflow.com/questions/6601536/ios-voip-socket-will-not-run-in-background
|
Keepalive logic example:
Which you could use and put into: Socket that is used under the hood, and method to tag the socket with voip capability: |
Okay, well you said you have the backgrounding working on the socket. If you want to try out code from Hailg just follow the instructions in README now as it's all merged. You're on an old version of everything at this point, so it's hard to speculate or help too much. I think we might have solved the multiple ping issue in our code. Main concern then would be the keepalive handler and maybe a server timeout, but could be anything really. If you want it to run in the background, you'll have to do your ping inside the special iOS handler. Based on the documentation, on iOS "The minimum allowable interval for running your handler is 600 seconds" so this would be in violation at 6 minutes or 360 seconds of the PingTask interval, as well as the fact that it runs in it's own socketserver. Anyways best of luck and if you have any specific changes or fixes, feel free to improve and send a pull request. |
What I did to maintain voip calling when the app closes (if you're on a call still) is add the following to the *socketserver.cc:
While I'm not interested in receiving calls while in the background, that will raise a interesting problem since you can only have those flags on 1 socket at a time, otherwise iOS will kill them all. So it's almost like we need to remove those properties from the data socket and apply it to the xmpp socket if we're not on a call. Because xmpp is the driver for incoming calls while in the background. I have yet to get to that point. I tried hailg's xmpp version he posted on Mega but I couldn't get it to make a call - haven't really dug into it yet though. I think related to this current issue - you're right, I think I just need to add the keepalive callback and do the pings. I'm disconnecting the connection when it goes into the bg, so it doesn't matter too much. Regarding xmpp-ios vs libjingle-xmpp ... I would most likely stick with the libjingle version since its already baked in. I just don't have the time to redo my code to work with the xmpp-ios version (delegates and whatnot). I'm sure if we dug into what makes it work in the bg, it would end up being similar properties mentioned above. |
If you follow the instructions in the README of this project that does work You probably would want a fresh checkout though so you don't mess up your |
I get this error after about 35+ minutes of idle. Here is some more bits of the log:
Thu May 16 14:58:00 2013 | Processing PingTask
Thu May 16 14:58:00 2013 | Processing PingTask
Thu May 16 14:58:10 2013 | Processing PingTask
Thu May 16 15:04:00 2013 | Processing PingTask
Thu May 16 15:04:00 2013 | Processing PingTask
Thu May 16 15:04:10 2013 | Processing PingTask
Thu May 16 15:10:00 2013 | Processing PingTask
Thu May 16 15:10:00 2013 | Processing PingTask
Thu May 16 15:10:10 2013 | Processing PingTask
Thu May 16 15:16:00 2013 | Processing PingTask
Thu May 16 15:16:00 2013 | Processing PingTask
Thu May 16 15:16:10 2013 | Processing PingTask
Thu May 16 15:22:00 2013 | Processing PingTask
Thu May 16 15:22:00 2013 | Processing PingTask
Thu May 16 15:22:10 2013 | Processing PingTask
Thu May 16 15:31:40 2013 | Processing PingTask
Thu May 16 15:31:40 2013 | OpenSSLAdapter::OnCloseEvent(54)
Thu May 16 15:31:50 2013 | Processing PingTask
Thu May 16 15:37:40 2013 | Warning(openssladapter.cc:407): OpenSSLAdapter::Error(SSL_write, -1)
I noticed you posted some new code regarding ping task. Could that resolve?
The text was updated successfully, but these errors were encountered: