From da577ef923588792b0e0204635d3cf6c43886d19 Mon Sep 17 00:00:00 2001 From: "roberto@sirius" Date: Thu, 16 Dec 2010 18:25:33 +0100 Subject: [PATCH] fixed poll() usage --- master.c | 8 ++++++-- uwsgi.h | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/master.c b/master.c index 6f69f90c..f943d167 100644 --- a/master.c +++ b/master.c @@ -423,7 +423,7 @@ void master_loop(char **argv, char **environ) { } else { #endif - rlen = poll(uwsgi_signal_poll, uwsgi.numproc, check_interval); + rlen = poll(uwsgi_signal_poll, uwsgi.numproc, check_interval*1000); if (rlen < 0) { uwsgi_error("poll()"); continue; @@ -560,10 +560,14 @@ void master_loop(char **argv, char **environ) { uwsgi_cluster_add_me(); } - continue; #endif + // now check for lb pool + + + continue; + } #ifdef UWSGI_SPOOLER /* reload the spooler */ diff --git a/uwsgi.h b/uwsgi.h index 83ada6ca..1e833139 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -844,6 +844,20 @@ struct uwsgi_server { void *user_lock; }; +struct uwsgi_lb_group { + char name[101]; + int kind; +} + +struct uwsgi_lb_node { + + char name[101]; + int group; + uint64_t hits; + time_t last_choosen; + +} + #define CLUSTER_NODE_STATIC 0 #define CLUSTER_NODE_DYNAMIC 1