Comments (14)
I'd second this issue. It's possible to crash server from the client side and have aforementioned exception (sorry, no repro).
from fleck.
I second this issue also
from fleck.
I second this issue too.
from fleck.
Please give this a try to check whether the issue has been resolved or not:
#27
from fleck.
Hi
I observe still the same problem also with your implementation.
Connection establishment and message passing works fine.
As soon I close Firefox I get an exception, see screenshot.
I use Windows 7, and Firefox 8.0.1.
Beni
-----Ursprüngliche Nachricht-----
Von: Ernst Naezer [mailto:[email protected]]
Gesendet: Mittwoch, 23. November 2011 12:15
An: Loesch Benjamin
Betreff: Re: [Fleck] Error when closing the socket on the client (#18)
Please give this a try to check if the issue has been resolved:
#27
Reply to this email directly or view it on GitHub:
#18 (comment)
from fleck.
That did not fix the issue for me
On Nov 23, 2011 6:14 AM, "Ernst Naezer" <
[email protected]>
wrote:
Please give this a try to check if the issue has been resolved:
#27
Reply to this email directly or view it on GitHub:
#18 (comment)
from fleck.
I've added a second layer of checks and removed the duplicate OnFaulted callback. Firefox now seems play nice but I'm not sure what the second Fault handler on the task object is doing differently then first one. Perhaps Statianzo can elaborate a bit on that?
from fleck.
The two OnFaulted handlers are for different purposes.
var task = Task.Factory.FromAsync<int>(begin, _stream.EndRead, null);
task.ContinueWith(t => callback(t.Result), TaskContinuationOptions.NotOnFaulted)
.ContinueWith(t => error(t.Exception), TaskContinuationOptions.OnlyOnFaulted);
task.ContinueWith(t => error(t.Exception), TaskContinuationOptions.OnlyOnFaulted);
The chained ContinueWith
handles exceptions thrown in callback
. The second handles exceptions thrown from _stream.EndRead
.
Not having the second ContinueWith will cause EndRead exceptions to get swallowed.
from fleck.
right,. that makes a lot of sense!
On Wed, Nov 23, 2011 at 22:30, Jason Staten
[email protected]
wrote:
The two OnFaulted handlers are for different purposes.
var task = Task.Factory.FromAsync(begin, _stream.EndRead, null);
task.ContinueWith(t => callback(t.Result), TaskContinuationOptions.NotOnFaulted)
.ContinueWith(t => error(t.Exception), TaskContinuationOptions.OnlyOnFaulted);
task.ContinueWith(t => error(t.Exception), TaskContinuationOptions.OnlyOnFaulted);The chained
ContinueWith
handles exceptions thrown incallback
. The second handles exceptions thrown from_stream.EndRead
.Not having the second ContinueWith will cause EndRead exceptions to get swallowed.
Reply to this email directly or view it on GitHub:
#18 (comment)
from fleck.
I found that out the hard way when Fleck was silently failing.
What I might suggest looking into is handling AggregateException containing ObjectDisposedException in the error handlers of Send/Receive. No matter how many IsConnected style checks are put in before the Read/Write calls, there's still the possibility of of an ObjectDisposed due to the asynchronous operation of Fleck.
The other possibility is using CancellationTokens for the tasks. Not sure if that could prevent all ObjectDisposeds though.
I apologize for not getting to this. I've been swamped.
from fleck.
hi guys,
I've had some time to look into this issue again and I've added a separate function to run the async code that catches the disposed & IO exceptions. Please feel free to take a look at this commit and give it a try.
https://github.com/enix/Fleck/commit/32f0f72ac3d10862f0599f2c808727178c3b026a
from fleck.
Please test this fix out (for the ObjectDisposed, not IOException). The exceptions still get logged when verbosity is Debug, but the server shouldn't get taken down.
from fleck.
Works for me it seems
On Jan 2, 2012 6:52 PM, "Jason Staten" <
[email protected]>
wrote:
Please test this fix out (for the ObjectDisposed, not IOException). The
exceptions still get logged when verbosity is Debug, but the server
shouldn't get taken down.
Reply to this email directly or view it on GitHub:
#18 (comment)
from fleck.
I'm going to close this. The fix is included in 0.8.2, currently on Nuget.
from fleck.
Related Issues (20)
- How to set a timeout HOT 4
- WSS-Connection failing when running WebServer inside Docker-Container HOT 5
- should prevent listen socket inherited by subprocess HOT 1
- Error in EnabledSslProtocols Tls13 HOT 4
- Handshake SupportedSubProtocols does not work. HOT 3
- How to find out how many connections are connected to a websocket? HOT 1
- Slow Connection Times?
- net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH HOT 2
- Disposing the server when RestartAfterListenError is true may result in a restarted socket
- Memory leak when sending from the server. HOT 1
- Is this project abandoned? HOT 3
- How to get the websocket connecting a client in server.start() HOT 2
- Question: SSL Client Certificate difference HOT 4
- How to let the session close at end of the prosess by OnMessage, disable.
- Server cannot receive binary data with OnBinary if there is OnMessage
- Custom CipherSuite
- Garbled messages from server
- RobiniaDocs API Explorer
- Hi, boss , why don't upgrade new version of Fleck? thx.
- maximum received message size?
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 fleck.