Commit 28135bd
committed
native: Do not process ancillary messages upon recvmsg error
Previously, when trying to receive ancillary messages, a failing call to
recvmsg (returning -1 with some errno) would still attempt to parse
ancillary messages stored in the receive buffer.
This would, under some circumstances and relatively sporadically, for
example when using nonblocking sockets, return duplicate file
descriptors (e.g, see
FileDescriptorsTest.testSendRecvFileDescriptorsChannelNonBlocking)
Detect the error case and skip parsing of ancillary messages.1 parent 46f8ce6 commit 28135bd
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments