Giter Site home page Giter Site logo

Comments (12)

RyanTT avatar RyanTT commented on June 21, 2024 1

Please let me know if this build fixes it for you https://www.nuget.org/packages/BytexDigital.BattlEye.Rcon/1.0.3-preview.1667665039

from bytexdigital.battleye.rcon.

PhilPhonic avatar PhilPhonic commented on June 21, 2024 1

Hey,

that build seems to fix the issue. The exception is gone and I'm no longer seeing those multiple connections in my first tests.

from bytexdigital.battleye.rcon.

PhilPhonic avatar PhilPhonic commented on June 21, 2024 1

No worries. I don't think there are any negative side effects (except those multiple logins). Only one of those connections seems to be alive since the events are only received once.

Thanks for fixing the main issue ;)

from bytexdigital.battleye.rcon.

RyanTT avatar RyanTT commented on June 21, 2024

Hi,

I noticed the client does not dispose of the network connection correctly if the connection is faulty/no longer used. Please try the following preview build if it manages to handle this better, unfortunately I currently have no server to test this myself yet:

https://www.nuget.org/packages/BytexDigital.BattlEye.Rcon/1.0.3-preview.1667557328

from bytexdigital.battleye.rcon.

PhilPhonic avatar PhilPhonic commented on June 21, 2024

Hey,

thanks for the quick response. Running into an exception now:

A task was canceled.
   at BytexDigital.BattlEye.Rcon.NetworkConnection.Heartbeat()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()

BytexDigital.BattlEye.Rcon
   bei BytexDigital.BattlEye.Rcon.NetworkConnection.<Heartbeat>d__22.MoveNext()
   bei System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs: Zeile1917
   bei System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs: Zeile979
   bei System.Threading.ThreadPoolWorkQueue.Dispatch() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs: Zeile790
   bei System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs: Zeile63
   bei System.Threading.Thread.StartCallback() in /_/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs: Zeile106

from bytexdigital.battleye.rcon.

RyanTT avatar RyanTT commented on June 21, 2024

Hi, where exactly is this exception being thrown? From the call to Connect()?

from bytexdigital.battleye.rcon.

PhilPhonic avatar PhilPhonic commented on June 21, 2024

Hey again,

seems like it's not completely fixed. Sometimes those multiple connections still appear. But only one seems to be alive, cause the NetworkClient_MessageReceived is only received once per login.

2022-11-06 16:01:29.073 INFO: Connected
2022-11-06 16:01:29.265 INFO: Server message: RCon admin #0 (127.0.0.1:43875) logged in
2022-11-06 16:01:29.573 INFO: Server message: RCon admin #1 (127.0.0.1:46393) logged in
2022-11-06 20:01:36.670 INFO: Connected
2022-11-06 20:01:37.038 INFO: Server message: RCon admin #0 (127.0.0.1:59162) logged in
2022-11-06 20:01:37.573 INFO: Server message: RCon admin #1 (127.0.0.1:49233) logged in
2022-11-06 20:01:37.762 INFO: Server message: RCon admin #2 (127.0.0.1:57370) logged in

from bytexdigital.battleye.rcon.

RyanTT avatar RyanTT commented on June 21, 2024

I'm not sure how to handle this case, as I believe it is the OS/underlying code that has the UDP package be sent despite the .NET socket already being closed.

My assumption is that when the datagram is outbound for a localhost port, then Windows does not send the datagram until the port is available to receive it, and the package is buffered despite the UdpClient already being closed.

from bytexdigital.battleye.rcon.

RyanTT avatar RyanTT commented on June 21, 2024

Please try this build https://www.nuget.org/packages/BytexDigital.BattlEye.Rcon/1.0.3-preview.1667929841

from bytexdigital.battleye.rcon.

PhilPhonic avatar PhilPhonic commented on June 21, 2024

Thanks, will try that build.

ps: The tool and gameserver is running on Debian Linux

from bytexdigital.battleye.rcon.

PhilPhonic avatar PhilPhonic commented on June 21, 2024

The problem still exists in the latest build.

2022-11-08 20:01:29.388 INFO: [livonia] Connected
2022-11-08 20:01:29.622 INFO: [livonia] Server message: RCon admin #0 (127.0.0.1:41556) logged in
2022-11-08 20:01:29.998 INFO: [livonia] Server message: RCon admin #1 (127.0.0.1:55404) logged in
2022-11-08 20:01:36.208 INFO: [chernarus] Connected
2022-11-08 20:01:36.442 INFO: [chernarus] Server message: RCon admin #0 (127.0.0.1:36568) logged in
2022-11-08 20:01:36.885 INFO: [chernarus] Server message: RCon admin #1 (127.0.0.1:44482) logged in
2022-11-08 20:01:37.089 INFO: [chernarus] Server message: RCon admin #2 (127.0.0.1:52965) logged in

from bytexdigital.battleye.rcon.

RyanTT avatar RyanTT commented on June 21, 2024

I'm afraid I'm out of options to try. Is there any negative side effect from this happening?

from bytexdigital.battleye.rcon.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.