-
Notifications
You must be signed in to change notification settings - Fork 45
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
WebSocket link list crash on page reload #70
Comments
Hi @WayneKeenan, stack trace? I'm guessing the same regarding the ll update but I'm not sure we know where to perform that yet. |
I didn't think it would help a great deal and there's a load of 'private' stuff, but then that was a bit presumptuous/looks good enough from my POV. Sorry to be lazy and not give more context, not my usual form. edited:
|
Hmm. Sure you didn't remove some libesphttpd stuff? Who is calling cgiWebsockBroadcast? |
all the blanked out lines are my code, the prior stack entry is:
|
It just seems to be a case of calling a websocket update on a stale handle |
Doesn’t this mean your code is calling that function after the connection
was closed? I can’t recall the usage off hand but aren’t you receiving
callbacks when connections are terminated that would indicate not to send
via that connection? I could be totally off on the usage though.
I’m not defending the design or approach either, if we can improve it or
clarify we should do so.
Chris
…On Sun, Jun 23, 2019 at 9:43 AM Wayne Keenan ***@***.***> wrote:
It just seems to be a case of calling a websocket update on a stale handle
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#70?email_source=notifications&email_token=AAJH4AAKNTXZVVRD4V7QCHLP354Z5A5CNFSM4H2YWOPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYK64QA#issuecomment-504753728>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJH4ABEHRZGJJRUDX5V4QLP354Z5ANCNFSM4H2YWOPA>
.
|
The API to publish a broadcast WS message is a NOP if no client has ever loaded the page. Please look at your example. But on reload the exact same call crashes. |
Hi @WayneKeenan. Hmm, yeah its simpler if we don't need any lifecycle management. I can't recall who has worked on the websockets most recently but I'm hoping someone will spot this and know what might be going on. If you have some idea about where the issue is we could look into it in more detail. |
Hi,
If I reload a page that has an active web socket connection then there is a crash at:
https://github.com/chmorgan/libesphttpd/blob/master/util/cgiwebsocket.c#L149
Presumably the previous page's web socket is no longer valid and there should have been a LL update or guard here?
The text was updated successfully, but these errors were encountered: