You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set the receiveTimeout as 1 second when the request should take 2.
Cancel the request before the 1 second.
Expected Result
No exceptions.
Actual Result
The following message was thrown:Bad state: Cannot add event after closingWhen the exception was thrown, this was the stack: #1 handleResponseStream.watchReceiveTimeout.<anonymous closure> (package:dio/src/response/response_stream_handler.dart:48:20)#5 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)(elided 4 frames from class _Timer, dart:async, and dart:async-patch)
The text was updated successfully, but these errors were encountered:
Fixes#2115
### New Pull Request Checklist
- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [x] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [x] I have updated the `CHANGELOG.md` in the corresponding package
Package
dio
Version
5.4.1
Operating-System
Android
Output of
flutter doctor -v
No response
Dart Version
No response
Steps to Reproduce
receiveTimeout
as 1 second when the request should take 2.Expected Result
No exceptions.
Actual Result
The text was updated successfully, but these errors were encountered: