Toemsel / Network

C# Network Library

Home Page:https://push-force.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crashing if variables on connection event.

blockplacer opened this issue · comments

If the setup like that, causes crashing randomly, and if i remember correctly you could put variables on there for store stuff for each client. It acts corrently at first but it also causes crashes. I can store variables for each client but it crashes after some time, and no exception on the console. Only the client gives exception taskcancelledexception

        private static void connectionEstablished(Connection connection, ConnectionType type)
        {

            connection.TIMEOUT = Int32.MaxValue;

            connection.KeepAlive = false;
            string user = "userplaceholder";
            bool plrdth = false;
            int index = 1;

Version: 6.2.4.21
Steps to reproduce: variables inside of event
Thing i trying to do: Having variables for each other for example keeping track of if user already joined and keeping index value for a list to change properties of list runtime also for performance, not searching index every request**

But most weirdest behaivor is after client crashed server still acts like client is online on the server.

Also after crashing, it does not throw a exception if connection is lost. Just TaskCancelledException on the Client.