Commit 24788e3
committed
libev reactor: Return from watchers for closed connection
Previous commit defered socket close until watchers are stopped, but
there is one more case worth considering.
If during one libev loop iteration socket gets ready for both read and
write, then both watchers will be called. If one decides to close the
connection, the other one will still get called anyway.
This shouldn't cause EBADF, because socket won't be closed yet, but I
see no reason to perform unnecessary work.1 parent 2e0ae94 commit 24788e3
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| 324 | + | |
| 325 | + | |
324 | 326 | | |
325 | 327 | | |
326 | 328 | | |
| |||
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
| 367 | + | |
| 368 | + | |
365 | 369 | | |
366 | 370 | | |
367 | 371 | | |
| |||
0 commit comments