dart-lang / dart-lang/http

Frequent bad file descriptor errors on iOS

Open
#197 76 comments 155 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
1.1k
Forks
419
Avg merge
4d 14h
Merged PRs (30d)
8

Description

We deploy a Flutter app and have been noticing frequent exceptions from our HTTP requests:

```
SocketException: OS Error: Bad file descriptor, errno = 9, address = , port = 64436
```

From my discussion with @johnfesa, it is sometimes expected for iOS to throw these bad file descriptor errors. See Apple's [Networking and Multitasking](https://developer.apple.com/library/archive/technotes/tn2277/_index.html#//apple_ref/doc/uid/DTS40010841-CH1-SUBSECTION3) documentation. However, we're filing this issue for a few reasons:

- Since this exception is expected to occur on iOS, we were wondering if it might be a good idea to raise a more specific exception than a generic OS error.

- We're noticing this error frequently enough that we wanted to double check that there isn't an issue with the way the sockets are being managed that would be causing it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.