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
When I send a message and disconnect a client immediately afterwards (in the same tick) it seems like this last message is being dropped. I was wondering if the framework shouldn't make sure that no messages are lost, meaning that message and disconnect are processed in the appropriate order.
This is a simple code example in C#:
var message = new FinalMessage();
client.Send(message.Serialize());
client.Disconnect();
The FinalMessage will not arrive at the host.
The text was updated successfully, but these errors were encountered:
The cause of this problem is that the client does not care about messages in its queue when closing the connection. This is, I guess, because Telepathy is mainly used for authoritative servers. In that scenario, you do not care about messages sent to the server when you are sure you will not get the server's answer.
In my case, I need the client to reliably send all messages to the server. If you are interested in the workaround I implemented, you can have a look at my client.cs file. I cloned the repository and the file can be viewed under Client.cs.
But as I said, it's only a hacky workaround which suits my needs.
When I send a message and disconnect a client immediately afterwards (in the same tick) it seems like this last message is being dropped. I was wondering if the framework shouldn't make sure that no messages are lost, meaning that message and disconnect are processed in the appropriate order.
This is a simple code example in C#:
The FinalMessage will not arrive at the host.
The text was updated successfully, but these errors were encountered: