Skip to content

Commit

Permalink
Epoll: initialize unitilialized static epoll event
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <eduardo@monkey.io>
  • Loading branch information
edsiper committed Aug 5, 2014
1 parent 2b6326c commit 7fc6a5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/monkey/mk_scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
#define MK_SCHEDULER_CONN_PROCESS 1
#define MK_SCHEDULER_SIGNAL_DEADBEEF 0xDEADBEEF
#define MK_SCHEDULER_SIGNAL_FREE_ALL 0xFFEE0000

/*
* Scheduler balancing mode:
*
* - Fair Balancing: use a single socket and upon accept
* new connections, lookup the less loaded thread and
* assign the socket to that specific epoll queue.
*
* - ReusePort: Use new Linux Kernel 3.14 feature that
* - ReusePort: Use new Linux Kernel 3.9 feature that
* allows thread to share binded address on a lister
* socket. We let the Kernel to decide how to balance.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/mk_epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ static int mk_epoll_timeout_set(int efd, int exp)
int ret;
int timer_fd;
struct itimerspec its;
struct epoll_event event;
struct epoll_event event = {0, {0}};

/* expiration interval */
its.it_interval.tv_sec = exp;
Expand Down

0 comments on commit 7fc6a5f

Please sign in to comment.