-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check up on socket close habdler and socket streams #941
Comments
The handling of the socket event callbacks in relation to streams should be OK now. The onClose callback is only hooked up by the input stream if used. Also exceptions are thrown if using both an input stream and onData/onClose events on the socket. The same goes for the output stream and the onWrite event. Added Fixed label. |
This comment was originally written by [email protected] Removed Type-Review label. |
Removed Area-IO label. |
The rules for returns with null-safety were changed in language PR #941, and this PR makes changes to async/return_types_test.dart such that it matches the new rules. Check base vs. patchset 1 to see these adjustments. The main part of this PR is that it migrates and updates the tests language/invalid_returns/{,a}sync_{,in}valid*_test.dart such that they match the new rules. Check patchset 1 vs newest patchset to see this migration. Note that some tests are new, e.g., 'sync_invalid_return_27_test', which was added because it is a new property that there is an error for "return void to Null". Also note that some of the tests are redundant: (1) It is no longer allowed to return void to Null, but (2) that's an error already with null-safety, because it's a downcast (so it doesn't matter which supertype of `Null` we have). I kept these tests anyway (and even wrote this new one), because they do check that certain changes have been implemented, even though it is in some cases redundant in the sense that it's just another verification that implicit downcasts aren't supported any more. If we don't want this redundancy then we should remove about 10 tests (sync_invalid_return, async_invalid_return). Change-Id: I3f10682e1d0ed75067d6e8651588b727ffd3648f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145587 Commit-Queue: Erik Ernst <[email protected]> Reviewed-by: Leaf Petersen <[email protected]>
Both the socket input stream and the socket output stream can register a close handler with a socket. However one will overwrite the other.
This needs to be looked at.
The text was updated successfully, but these errors were encountered: