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

SRServerSentEventsTransport cannot negotiate with server #276

Open
chinaofmelon opened this issue Jul 25, 2016 · 4 comments
Open

SRServerSentEventsTransport cannot negotiate with server #276

chinaofmelon opened this issue Jul 25, 2016 · 4 comments

Comments

@chinaofmelon
Copy link

When I use SRServerSentEventsTransport, signalr always failed to connect to the server.I check the code found that block always be nil. when I fill the block, signalr work. How should I use this? And if I change this code, what's problem can be caused? The error code:

https://github.com/DyKnow/SignalR-ObjC/blob/feature-dev/SignalR.Client/Transports/SRServerSentEventsTransport.m
`

  • (void)negotiate:(id)connection connectionData:(NSString *)connectionData completionHandler:(void (^)(SRNegotiationResponse * response, NSError *error))block {

    SRLogSSEDebug(@"serverSentEvents will negotiate");

    [super negotiate:connection connectionData:connectionData completionHandler:nil];

}

`

@joeldart
Copy link
Member

We use the serversentevents heavily, so I am guessing there is something we are missing. Are you saying you use SRServerSentEventsTransport directly?

@abillingsley
Copy link
Collaborator

@joeldart found this bug while working on the feature-afnetworking3x branch. You wont hit it when using the autotransport. Just if using sse directly.

@chinaofmelon
Copy link
Author

@joeldart I am only use it for a test. For our debug server environment, SRWebSocketTransport and SRLongPollingTransport are working. When I use this, my colleague want to know if all of the transport are worked, so I found this issue. And I want to comfirm it.

@joeldart
Copy link
Member

@chinaofmelon Got it. Thanks for the clarification

joeldart added a commit that referenced this issue Oct 24, 2018
- Found a case that if you slow down sse transport then both transports
will be active causing a number of issues. Looks like we found that
before
- added completion block to see negotiate as well for #276
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

3 participants