Skip to content
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

requestHistoryForChannel: callback never called #65

Closed
vvit opened this issue May 28, 2014 · 4 comments
Closed

requestHistoryForChannel: callback never called #65

vvit opened this issue May 28, 2014 · 4 comments

Comments

@vvit
Copy link

vvit commented May 28, 2014

Hi. I use that call to get the channel history:

[PubNub requestHistoryForChannel: from: to: withCompletionBlock:^(...) {
       //stuff
    }];

But it seems if there's no Internet connection (airplane mode) the completion block is never called.
Can you check that?
Thanks a lot.

@parfeon
Copy link
Contributor

parfeon commented May 28, 2014

Hi @vvit

Did you called connect method of PubNub singleton?
Can you share piece of code which you are using to reproduce this issue and use case?

Best regards,
Sergey Mamontov

@vvit
Copy link
Author

vvit commented May 28, 2014

During the initialisation phase I call connect block:

[PubNub setDelegate:self];
[PubNub setConfiguration:[PNConfiguration ...]];
[PubNub connectWithSuccessBlock:^(..) {
    } errorBlock:^(..) {
}];

and get the error:

Domain=com.pubnub.pubnub; Code=102; Description="PubNub client connection failed"; Reason="Looks like the client lost it's net connection while trying to connect to the PubNub origin"; Fix suggestion="Ensure that all network configuration (including any proxy) is correct, and try again."; Associated object=(null)

After that I call [PubNub requestHistoryForChannel:...] which is causing a problem I described.
Is that a normal behaviour?
Thanks for the fast response.

@parfeon
Copy link
Contributor

parfeon commented May 28, 2014

Well, it has been designed this way. Initial connection failure will stack further requests till internet connection restore (special case). If connection will go down after successful connection, it will report errors.

@vvit
Copy link
Author

vvit commented May 28, 2014

All right, so I guess I need to check these conditions before making the
history request. Thanks for the info.

On 28 трав. 2014, at 18:21, Sergey notifications@github.com wrote:

Well, it has been designed this way. Initial connection failure will stack
further requests till internet connection restore (special case). If
connection will go down after successful connection, it will report errors.


Reply to this email directly or view it on
GitHubhttps://github.com//issues/65#issuecomment-44420937
.

@vvit vvit closed this as completed May 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants