Comments (4)
This exception is System.ObjectDisposedException, which usually occurs when trying to access an object that has already been disposed. In this case, the exception occurs in the System.Threading.Mutex.ReleaseMutex() method, which means you may be trying to release a mutex that has already been released. In the code you provided, _singleWriteMutex.ReleaseMutex() is called in the finally block, which means it will be executed whether or not the code in the try block throws an exception. If _singleWriteMutex is released before the finally block is executed, then when the finally block tries to release it, it will throw an ObjectDisposedException. To solve this problem, you need to ensure that _singleWriteMutex is not released before the finally block is executed. You can do this by checking if _singleWriteMutex is null or has already been released. Here is a possible solution:
try
{
_singleWriteMutex.WaitOne();
using (PayloadWriter pw = new PayloadWriter(_stream, true))
{
OnClientWrite(message, pw.WriteMessage(message));
}
}
catch (Exception)
{
Disconnect();
SendCleanup(true);
}
finally
{
if (_singleWriteMutex != null && _singleWriteMutex.SafeWaitHandle.IsClosed == false)
{
_singleWriteMutex.ReleaseMutex();
}
}
from quasar.
Can you create a PR with the fix?
from quasar.
您可以使用修复程序创建 PR 吗?
What's PR?
from quasar.
from quasar.
Related Issues (20)
- Quasar client crash after adding package from nuget HOT 1
- not working HOT 1
- Not receiving any connections from clients HOT 1
- Remote chat implementation with client request. HOT 1
- compress and decompress rar and zip file HOT 1
- Can this project use the QUIC communication protocol and support streaming? HOT 1
- Sending text from client form to server throws exception HOT 3
- Remote chat implementation issue [Question]
- What am i missing? HOT 1
- how do i end the proccess HOT 6
- Quasar Update HOT 4
- Connection Problem HOT 8
- Random people connecting to Quasar HOT 3
- Connection/port
- doesnt connect HOT 1
- Not Connecting
- Linux port for Quasar.exe (not the client) HOT 1
- question
- Quasar OS Detect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quasar.