# os: expect ETIMEDOUT, ECONNRESET, ENOTCONN from recvfrom & read family · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/19af8aac82510d9adc35fa11db9c57676d4abd23)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 19af8aac82510d9adc35fa11db9c57676d4abd23

Requested commit: 19af8aac82510d9adc35fa11db9c57676d4abd23

Commit: 19af8aac82510d9adc35fa11db9c57676d4abd23

Tree: 9d14d2b31884f43fb714e951e03e26d76e3d1ca8

Author: Lauri Tirkkonen

Committer: Andrew Kelley

## Message

```
os: expect ETIMEDOUT, ECONNRESET, ENOTCONN from recvfrom & read family

reads on eg. connected TCP sockets can fail with ETIMEDOUT, and ENOTCONN
happens eg. if you try to read a TCP socket that has not been connected
yet.

interestingly read() was already handling CONNRESET & TIMEDOUT, but
readv(), pread(), and preadv() were somewhat inconsistent.

```

## Parents

- [280140595fcfe9676ed32a7906eb7958a4c595b1](https://git.cafe/gitcafe/zig/commit/280140595fcfe9676ed32a7906eb7958a4c595b1?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/19af8aac82510d9adc35fa11db9c57676d4abd23?format=markdown)
