Skip to content
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

Sending a message from server to disconnected client using unreliable channel. #129

Closed
awgil opened this issue Dec 26, 2019 · 2 comments
Closed

Comments

@awgil
Copy link

awgil commented Dec 26, 2019

Currently if you try to send a message from server to disconnected client using unreliable channel, this message will be received by the next client that connects into same "slot".

The problem is that Server::SendMessage() simply calls UnreliableUnorderedChannel::SendMessage(), which adds message to the send queue, and this message stays there - Server::SendPackets() will skip disconnected clients. Next client that gets assigned to the same client index will then receive this message instead.

While it's easy to fix on the user side (skip code that sends messages to particular client if this client has disconnected), I think library should handle this better (either assert or ignore SendMessage, not sure which is better).

@gafferongames
Copy link
Contributor

Seeing as it is an unreliable channel, the message should just be silently dropped. Can you make a PR that does this?

@gafferongames
Copy link
Contributor

This should be fixed in head

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

No branches or pull requests

2 participants