Commit Graph

19 Commits

Author SHA1 Message Date
Igor Sysoev
e616d0915c Disabled epoll error processing when socket events are inactive. 2020-04-15 14:54:09 +03:00
Igor Sysoev
96cd6558ce Fixed connect(2) errors processing on old Linuxes.
While connect(2) states that non-blocking connect should use EPOLLOUT:

  EINPROGRESS
    The socket is non-blocking and the connection cannot be completed
    immediately.  It is possible to select(2) or poll(2) for completion by
    selecting the socket for writing.  After select(2) indicates writability,
    use getsockopt(2) to read the SO_ERROR option at level SOL_SOCKET to
    determine whether connect() completed successfully (SO_ERROR is zero)
    or unsuccessfully (SO_ERROR is one of the usual error codes listed here,
    explaining the reason for the failure).

On connect error, Linux 2.6.32 (CentOS 6) may return EPOLLRDHUP, EPOLLERR,
EPOLLHUP, EPOLLIN, but not EPOLLOUT.
2019-11-14 16:39:48 +03:00
Andrey Zelenkov
22de5fcddf Style. 2019-03-11 17:31:59 +03:00
Igor Sysoev
d4a99aad84 Backout of ba94959b1dec and improving epoll error handling. 2018-10-23 16:31:42 +03:00
Igor Sysoev
50dd54877d Improved epoll failures handling.
epoll changes are committed to the kernel before epoll_wait() or
on changes array overflow.  In the latter case if there are errors
epoll_wait() timeout was not set to zero.

This commit is related to #173 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
2018-10-22 17:43:28 +03:00
Igor Sysoev
deeb276d23 Removed duplicate code in epoll.
This commit is related to #173 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
2018-10-22 16:25:58 +03:00
Igor Sysoev
96cd68b340 Added SSL/TLS support on connection level. 2018-09-20 15:05:37 +03:00
Igor Sysoev
74b69f5e95 Fixed typo.
This closes #166 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
2018-09-17 16:37:13 +03:00
Valentin Bartenev
0665896a55 Style: capitalized letters in hexadecimal literals. 2018-04-04 18:13:05 +03:00
Valentin Bartenev
912a49c609 Reduced number of critical log levels. 2018-03-05 17:32:50 +03:00
Igor Sysoev
5365dadb4b signalfd() notification should be ignored if nothing was read. 2018-02-12 20:09:13 +03:00
Igor Sysoev
653e985463 Added Linux 4.5 EPOLLEXCLUSIVE support. 2017-10-04 15:13:22 +03:00
Igor Sysoev
4d5e39e8c1 Fixed textual socket name lengths and Unix domain sockaddr length. 2017-09-14 18:16:22 +03:00
Andrei Vagin
962f127939 Fixed a memory leak.
This closes #2 RP on GitHub.
From f13cca01b7aa489dcb6909513f2b781b36ac7fea
2017-09-08 14:10:48 -07:00
Igor Sysoev
7574c64992 nxt_event_conn_... functions and structures have been renamed
to nxt_conn_...
2017-06-14 15:18:52 +03:00
Valentin Bartenev
cb1624fa42 Fixed building with epoll (broken in 92b4984ca3c1). 2017-06-09 21:37:29 +03:00
Igor Sysoev
5bc011afad Skeleton of router configuration and request processing. 2017-05-31 15:26:45 +03:00
Igor Sysoev
029942f4eb I/O operations refactoring. 2017-02-22 15:09:59 +03:00
Igor Sysoev
059a864289 Event engines refactoring. 2017-02-07 20:04:56 +03:00