mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-08 14:41:55 +00:00
remove useless service_unavailable in proxy
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user