This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 637
Inconsistent behavior when using replication #778
Closed
Closed
Changes from 29 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
70158a0
ensure that channel exists across instances when using redis manager …
mdprotacio c218a95
handle missing channel on server1 not propagating message to server2
mdprotacio 2fe5fca
check against the list of channels in redis
mdprotacio 5c21b8a
trying to fix
mdprotacio 96f53bc
sync channel list across servers
mdprotacio 7fbd37c
added documentation
mdprotacio 374d686
channel should always be registered to propagate across servers
mdprotacio fb27ded
fixes on broadcasting to everyone
mdprotacio e12aae5
do not replicate on call to broadcast as it is already broadcasted ac…
mdprotacio d255a4e
include serverId in socketId
mdprotacio 7ba243b
Revert "include serverId in socketId"
mdprotacio 92eb8c3
remove channel from set only if connections is less than 1
mdprotacio 2964c3f
update lastPongedAt whenever we send message to the connection to avo…
mdprotacio 5619003
consider connection as ponged for every message sent to connection
mdprotacio 1be80f1
mark connection as ponged to update lastPongedAt and avoid cleanup fo…
mdprotacio 5ad16c1
trying to fix issues with pong on server message
mdprotacio eee83fe
mark connection as ponged prior sending message
mdprotacio c70b032
mark as ponged prior sending message
mdprotacio 93bdc9d
add space after function keyword
mdprotacio 2ca34a7
update connection on presence channel to be ponged upon subscription
mdprotacio 1bb434d
update connection on presence channel to be ponged upon subscription
mdprotacio 86e73b5
fixes linting errors
mdprotacio 5ccae68
fixes linting errors
mdprotacio 7cae46a
use pubsub to update lastPongedAt across servers
mdprotacio ad6d345
when a message is sent or received, let's update lastPongedAt
mdprotacio e3f0add
trying to fix issues with socket not in set
mdprotacio ebf00d3
pong only the receiver for broadcasting to avoid having to keep the m…
mdprotacio b9ce798
fixes spacing issues
mdprotacio 00568fc
fixes more spacing issues
mdprotacio d481ab5
handle locks properly for connection cleanup
mdprotacio a298fcf
added space after try
mdprotacio 33cce95
Merge branch 'master' of github.com:koalaphils/laravel-websockets
mdprotacio 7bc0957
space after the try brace
mdprotacio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdprotacio hey! I am still fighting with one issue, this is not exactly related with your PR, as problem also persists on latest 2.0.0-beta.36 but I am hoping you can help me
what currently I am able to debug, is that after execution
unsubscribeFromTopic()
on at least one of ws server nodes first message/-s on client side is not received, commenting out this line - problem solved, kinda, but what is consequences? and maybe you will better understand why is that happeningThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I perfectly understand your issue. But it appears that maybe when you have unsubscribed from one node, the same is not propagated across other nodes. This may happen if the client is subscribed or connected using the other node but the unsubscribe happened on the other node. This, from what I can recall should have been cleaned up by the removeConnectionFromSet that is the next then of this block. It may be possible that unsubscribeFromTopic may have produced a failure and will stop processing the promise chain and may not remove the connection from the set.