Comments (4)
Summary: The SecureSocket.connect()
method with a specified timeout parameter does not consistently throw a timeout exception when the connection exceeds the set duration, leading to unreliable network connection timeouts. This issue requires investigation to determine why the timeout parameter is not being enforced as expected.
from sdk.
//cc @brianquinlan
from sdk.
We might not apply the timeout early enough:
static Future<_NativeSocket> connect(dynamic host, int port,
dynamic sourceAddress, int sourcePort, Duration? timeout) {
return startConnect(host, port, sourceAddress, sourcePort)
.then((ConnectionTask<_NativeSocket> task) {
Future<_NativeSocket> socketFuture = task.socket;
if (timeout != null) {
socketFuture = socketFuture.timeout(timeout, onTimeout: () {
task.cancel();
throw createError(
null, "Connection timed out, host: ${host}, port: ${port}");
});
}
return socketFuture;
});
}
from sdk.
close()
also encountered the same problem. Suggest conducting a unified investigation to identify potential issues with interfaces with timeouts.
from sdk.
Related Issues (20)
- Allow users and/or packages to create custom versions of "Wrap with ..." actions HOT 1
- [Null-aware elements] Analyzer Implementation
- [Null-aware elements] Implement AST enhancements
- standalone/io/unix_socket_test went from flaky -> RuntimeError on vm-reload-linux-debug-x64 HOT 1
- [CP] DevTools 2.37.2 HOT 2
- [Wildcard Variables] Support for wildcard record type positional fields
- default quick fixes for `omit_obvious_local_variable_types` HOT 3
- [CP] [ dart:io ] Fix minor bugs in network profiler | https://dart-review.googlesource.com/c/sdk/+/375800 HOT 5
- Improve `dart:developer` Timeline API HOT 1
- Even though the types match, the analyzer still reports a type mismatch, but there are no errors at runtime HOT 3
- [vm/core] Inlining `_GrowableList.add` bloats program too much HOT 2
- vm/dart/isolates/shared_primitives_test changing from flaky to RTE on vm-reload-linux-debug-x64 HOT 2
- [diagnostic] don't report `DUPLICATE_FIELD_NAME` if the name is invalid
- Refactoring to convert params/args between positional and named HOT 2
- Analyzer exception doesn't specify affected file HOT 2
- VM always prints "<isolate> has no debugger is attached and is paused"
- [dart2wasm] UnimplementedError when calling Flutter's Matrix4.translate with an integer argument HOT 2
- `where` can't accept an async predicate HOT 6
- [Augmentations] Wrong error in the analyzer when augmenting enum member
- [Augmentations] No error in the analyzer when augmenting a function type with no augmented type
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 sdk.