Comments (1)
Well, without knowing any more about the circumstances, I would say it's possible that it means just what it says: an operation timed out. There are two kinds of timeouts you can have with EventSource, and the duration for each of them is configurable:
- Connection timeout: if the server is just not responding to the connection attempt.
- Read timeout: if the connection seems to still be alive, but the server has not sent any data in a while.
The read timeout case is particularly tricky because under some circumstances, a streaming connection (not just for EventSource; for anything) can appear to still be open when really it has died, and there's no way to detect that except by noticing that no data has been received for a long time. So, it's common to add "heartbeat" behavior to the server that's providing the SSE stream: every so often (say 3 minutes) it writes a meaningless data item, or just a ":" comment line, to the stream simply so the client knows it's still alive. Then you would set the client's read timeout to some number greater than that (say 4 minutes).
In our experience, this is the best practice to deal with the kind of network unreliability I mentioned, so EventSource uses a read timeout by default. You can however set the read timeout to System.Threading.Timeout.Infinite
to disable this.
If you have reason to believe that that's not what's happening, then I would need to know more about your use case, like what is generating the stream, how often does it produce data, how long does your client run before seeing the error - anything at all that you can tell me besides just the stacktrace.
from dotnet-eventsource.
Related Issues (20)
- SSE Server, Disconnection detection HOT 1
- Release tag missed for 2.2.1 HOT 1
- Null Reference Exceptions in EventSource HOT 8
- Replace System assembly references with framework references HOT 1
- DelayRetryDuration not working as intended HOT 4
- ObjectDisposedException HOT 4
- .NET Standard 1 CVE HOT 7
- Exception when trying to startup LdClient with Event Source HOT 1
- CancellationTokenSource memory leak HOT 7
- close is not closing the stream which is leaving the socket alive HOT 9
- Make the EventSource-class extensible HOT 12
- EventSource doesn't use Proxy configuration HOT 3
- eventsource in blazor HOT 2
- Remove dependency on Polly-Signed HOT 1
- Question: Is there a sample code to know how to use this library? HOT 5
- Retry field not used correctly HOT 5
- Error when importing because of dependencies of LaunchDarkly.Logging HOT 4
- Error when trying to send a request with headers HOT 6
- ASP.NET app needs binding redirect to run HOT 2
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 dotnet-eventsource.