Skip to content

Monkeypatch negotiate to forward session-affinity cookies - #140

Open
MagneIngvaldsen wants to merge 1 commit into
nordicopen:masterfrom
MagneIngvaldsen:fix/negotiate-cookie-monkeypatch
Open

MagneIngvaldsen wants to merge 1 commit into
nordicopen:masterfrom
MagneIngvaldsen:fix/negotiate-cookie-monkeypatch

Conversation

@MagneIngvaldsen

Copy link
Copy Markdown

pysignalr doesn't forward cookies from the negotiate response to the WS handshake, so connections behind a load balancer using cookie-based session affinity fail with "No Connection with that ID". Same fix as baking-bad/pysignalr#49, monkeypatched here the same way easee.py already patches pysignalr's __aiter__.

Tested against the real Easee streaming API: 3/8 negotiate attempts succeeded before this patch, 8/8 after.

Related: #139

@MagneIngvaldsen
MagneIngvaldsen force-pushed the fix/negotiate-cookie-monkeypatch branch from 98310a2 to 57246a7 Compare September 21, 2026 07:21
@olalid

olalid commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

There seems to be some activity on pysignalr to change dependencies to "websockets>=15.0.1,<18" baking-bad/pysignalr#50
So maybe this will not be needed after all, given that this was fixed and merged there already?

@MagneIngvaldsen

Copy link
Copy Markdown
Author

Sure, if you can upgrade to a version with the fix no need for this PR

@droserasprout

droserasprout commented Sep 26, 2026 •

Copy link
Copy Markdown

Hey! Yeah, I saw this ticket and thought "why not, costs nothing".

@olalid, could I cast you for testing and review when that PR (ws 15-18 support) will left the draft state? I don't have real API targets to test against.

@olalid

olalid commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

Yes, I will be happy to test, thanks @droserasprout.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

3 participants