fixed emperor amqp

This commit is contained in:
roberto@precise64
2012-03-14 10:03:54 +01:00
parent 734818c995
commit d719960411
2 changed files with 8 additions and 3 deletions
+7 -1
View File
@@ -395,6 +395,10 @@ void emperor_add(char *name, time_t born, char *config, uint32_t config_size, ui
// close all of the unneded fd
for(i=3;i<(int)uwsgi.max_fd;i++) {
if (n_ui->use_config) {
if (i == n_ui->pipe_config[1])
continue;
}
if (i != n_ui->pipe[1]) {
close(i);
}
@@ -653,7 +657,9 @@ reconnect:
ssize_t rlen = read(interesting_fd, &byte, 1);
if (rlen <= 0) {
// SAFE
emperor_del(ui_current);
if (!ui_current->config_len) {
emperor_del(ui_current);
}
}
else {
if (byte == 17) {
+1 -2
View File
@@ -777,7 +777,7 @@ void uwsgi_socket_nb(int fd) {
int timed_connect(struct pollfd *fdpoll, const struct sockaddr *addr, int addr_size, int timeout, int async) {
int arg, ret;
int soopt;
int soopt = 0;
socklen_t solen = sizeof(int);
int cnt;
/* set non-blocking socket */
@@ -847,7 +847,6 @@ int timed_connect(struct pollfd *fdpoll, const struct sockaddr *addr, int addr_s
}
return 0;
}