rakijah / CSGSI

A simple C# library to interface with Counter-Strike: Global Offensive's Game State Integration
Other
129 stars 27 forks source link

Sometimes when I call .Stop() there is unexpected error #32

Closed DokAndMax closed 3 years ago

DokAndMax commented 3 years ago

System.Net.HttpListenerException HResult=0x80004005 Message=The I/O operation has been aborted because of either a thread exit or an application request Source=System StackTrace: at System.Net.HttpListener.EndGetContext(IAsyncResult asyncResult) at CSGSI.GameStateListener.ReceiveGameState(IAsyncResult result) at System.Net.LazyAsyncResult.Complete(IntPtr userToken) at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) at System.Net.ListenerAsyncResult.IOCompleted(ListenerAsyncResult asyncResult, UInt32 errorCode, UInt32 numBytes) at System.Net.ListenerAsyncResult.WaitCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped nativeOverlapped) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped pOVERLAP)

Code:

            AutoDisconnectFunc(true); // unsubscribing all event handlers from the events
            if (gslT1.Running)
                gslT1.Stop();
            if (gslT2.Running)
                gslT2.Stop();

what the problem ? I do not know why this occurs ? Can you help me ?