remove useless service_unavailable in proxy

This commit is contained in:
roberto@sirius
2010-03-10 15:51:22 +01:00
parent bf1f800cf4
commit 67d49defb6
-20
View File
@@ -71,25 +71,6 @@ static void reload_proxy (void) {
exit (UWSGI_RELOAD_CODE);
}
static void send_http_service_unavailable(int fd) {
if (write(fd, "HTTP/1.0 503 Service Unavailable\r\n", 34) != 34) {
perror("write()");
return ;
}
if (write(fd, "Content-type: text/html\r\n\r\n", 27) != 27) {
perror("write()");
return ;
}
if (write(fd, "<h1>Service Unavailable</h1>", 28) != 28) {
perror("write()");
return ;
}
}
static void uwsgi_proxy_close(struct uwsgi_proxy_connection *upcs, int fd) {
@@ -307,7 +288,6 @@ void uwsgi_proxy(int proxyfd) {
next_node = uwsgi_proxy_find_next_node(next_node);
if (next_node == -1) {
fprintf(stderr,"unable to find an available worker in the cluster !\n");
send_http_service_unavailable(NEV_FD);
uwsgi_proxy_close(upcs, NEV_FD);
continue;
}