kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit c063dd52f63ea556c128c69f501da2f53499bb5c
parent a197bd9bac7488fbc1e5cbdaf1da2e3edc19acf0
Author: Joris Vink <joris@coders.se>
Date:   Thu, 21 Aug 2014 16:33:11 +0200

epoll improvements.

* check for EPOLLRDHUP
* in kore_platform_schedule_read() don't use EPOLLET

Diffstat:
src/linux.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/linux.c b/src/linux.c @@ -96,7 +96,8 @@ kore_platform_event_wait(u_int64_t timer) type = *(u_int8_t *)events[i].data.ptr; if (events[i].events & EPOLLERR || - events[i].events & EPOLLHUP) { + events[i].events & EPOLLHUP || + events[i].events & EPOLLRDHUP) { switch (type) { case KORE_TYPE_LISTENER: fatal("failed on listener socket"); @@ -131,7 +132,8 @@ kore_platform_event_wait(u_int64_t timer) break; kore_platform_event_schedule(c->fd, - EPOLLIN | EPOLLOUT | EPOLLET, 0, c); + EPOLLIN | EPOLLOUT | + EPOLLRDHUP | EPOLLET, 0, c); } break; case KORE_TYPE_CONNECTION: @@ -185,7 +187,7 @@ kore_platform_event_schedule(int fd, int type, int flags, void *udata) void kore_platform_schedule_read(int fd, void *data) { - kore_platform_event_schedule(fd, EPOLLIN | EPOLLET, 0, data); + kore_platform_event_schedule(fd, EPOLLIN, 0, data); } void