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
The problem is if the connection is immediately terminated or has an error, Signalr-ObjC will continue on in this retry loop as if it was simply intermittent communication issues. This does not happen in other clients.
Replication Steps
Note: you will have to setup fiddler on your mac or setup a network proxy to run through fiddler on a pc
Create but do not initialize a fiddler rule to either terminate connection or return 503:
public static RulesOption("Kill websocket")
BindPref("fiddlerscript.rules.KillWS")
var m_KillWS: boolean = false;
public static RulesOption("Kill ServerSentEvents")
BindPref("fiddlerscript.rules.KillSSE")
var m_KillSSE: boolean = false;
public static RulesOption("Kill LongPolling")
BindPref("fiddlerscript.rules.KillLP")
var m_KillLP: boolean = false;
...
if (((m_KillWS && oSession.RequestHeaders.RequestPath.IndexOf("transport=webSockets") !== -1) ||
(m_KillSSE && oSession.RequestHeaders.RequestPath.IndexOf("transport=serverSentEvents") !== -1) ||
(m_KillLP && oSession.RequestHeaders.RequestPath.IndexOf("transport=longPolling") !== -1)) &&
oSession.RequestHeaders.RequestPath.IndexOf("negotiate") === -1 //let negotiates through
){
//note you cannot have both of these
// oSession.oRequest.pipeClient.EndWithRST();//<-- will kill connection
oSession.oRequest.FailSession(503, "503", "This was a 503");<-- will sent a 503
return;
}
Start connection and verify it uses ServerSentEvents
Turn on fiddler rule
in fiddler, find the serversentevents connect, right click, terminate
see how it continuously reconnects and never hits a reconnect timeout
Dev Requirements
figure out how to call opened after inspecting headers/
Fixed In
Testing
The text was updated successfully, but these errors were encountered:
- 503 errors or firewall software, etc will hit the
NSStreamEventOpenCompleted and thus the onOpened callback. But we do
not want to trigger didReconnect here or else we’ll never timeout our
reconnect. Instead, process the initialized message that is sent down.
- left out an important change for 300: moving the reconnect logic
exclusively to the message + initialized loop. prior code didn’t
actually change anything
Description
Once you have a connection set up for ServerSentEvents, if that connection is aborted/completed, by design, we reconnect. The current design relies on the stream open event https://github.com/DyKnow/SignalR-ObjC/blob/feature-dev/SignalR.Client/Transports/ServerSentEvents/SREventSourceStreamReader.m#L84 which then communicates up to the connection's didReconnect. At that point, the reconnect timeout is satisfied and we move over to connected.
The problem is if the connection is immediately terminated or has an error, Signalr-ObjC will continue on in this retry loop as if it was simply intermittent communication issues. This does not happen in other clients.
Replication Steps
Note: you will have to setup fiddler on your mac or setup a network proxy to run through fiddler on a pc
Dev Requirements
Fixed In
Testing
The text was updated successfully, but these errors were encountered: