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
I've been struggling with using websocket endpoints in Pode for quite a while because when multiple clients are connected, broadcast messages only send to a single endpoint (typically the one that most recently connected) making this feature rather useless. Rather then open an issue and beg for help, I went through all of the code and figured out the problem. On line 312 of Private/PodeServer.ps1 there is a break command which stops processing the loop and only sends the signal to the first matching path rather than all of them. I don't know why this is in there, but break is breaking this feature. I removed it in a local copy of the module and it fixed this issue for me and I can now use websockets as they are intended to work per the documentation. I propose removing this line to fix this issue:
I've been struggling with using websocket endpoints in Pode for quite a while because when multiple clients are connected, broadcast messages only send to a single endpoint (typically the one that most recently connected) making this feature rather useless. Rather then open an issue and beg for help, I went through all of the code and figured out the problem. On line 312 of
Private/PodeServer.ps1
there is abreak
command which stops processing the loop and only sends the signal to the first matching path rather than all of them. I don't know why this is in there, butbreak
is breaking this feature. I removed it in a local copy of the module and it fixed this issue for me and I can now use websockets as they are intended to work per the documentation. I propose removing this line to fix this issue:https://github.com/Badgerati/Pode/blob/c4184424d79e61449f03a58d77967c555f679ccc/src/Private/PodeServer.ps1#L312C45-L312C50
The text was updated successfully, but these errors were encountered: