From 0d11761e0d7c1c13f6a3828bc9f5b4fd52566634 Mon Sep 17 00:00:00 2001
From: Zeying Xie <swpdtz@gmail.com>
Date: Wed, 15 May 2013 19:44:43 +0800
Subject: [PATCH 2/3] Scheduler: Fix off-by-one error

Signed-off-by: Zeying Xie <swpdtz@gmail.com>
---
 src/mk_scheduler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mk_scheduler.c b/src/mk_scheduler.c
index 00ad5de..ed852df 100644
--- a/src/mk_scheduler.c
+++ b/src/mk_scheduler.c
@@ -80,7 +80,7 @@ static inline int _next_target()
      * If sched_list[target] worker is full then the whole server too, because
      * it has the lowest load.
      */
-    if (mk_unlikely(cur >= config->worker_capacity)) {
+    if (mk_unlikely(cur > config->worker_capacity)) {
         MK_TRACE("Too many clients: %i", config->worker_capacity * config->workers);
         return -1;
     }
-- 
1.8.2.3

