You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.
I found this issue while testing application on slow internet connections (well, it happens on all connections, it's just easier to reproduce when connection is slow enough). Here're steps to reproduce:
Open an app that establishes connection to meteor. Since it's a first launch, I handle 'wait until meteor connected' in app, so that no code can make meteor requests until app is connected, logged in, blablabla.
Minimize the app (without killing it) and wait few minutes - 5 minutes was enough in my case.
Open an app and initiate Meteor request (method call in my case). Since there are no events that say when Meteor client connected/disconnected/errored out, there is no way to monitor that status in my code. And in this case, logs specify that there was an error and the state is actually disconnected.
Callback is never called. My app is waiting for response indefinitely.
I see two issues with SwiftDDP related to this topic:
Function client.sendMessage. It calls directly self.socket.send(m) and doesn't check if connection is opened. Inside SwiftSocket code only sends a message when connection is opened. Otherwise, message is not sent and callback is not called, obviously.
Events. There's no way to track websocket events. The only events there are: User logged in, user logged out. I wish that client.events could be public and clients had an ability to hook to them. I saw that you are using DDPEvents in DDPClient, which prevents exposing it to the world. But those NSNotifications would be very helpful.
Yury
The text was updated successfully, but these errors were encountered:
I see, that you are only using 'onConnected' event. If it doesn't break the rest of the code, I could easily fork and add those Notification Center events to those callbacks. Let me know.
I found this issue while testing application on slow internet connections (well, it happens on all connections, it's just easier to reproduce when connection is slow enough). Here're steps to reproduce:
I see two issues with SwiftDDP related to this topic:
Yury
The text was updated successfully, but these errors were encountered: