Skip to content
This repository
Browse code

Some connections were being added to the polling list twice.

  • Loading branch information...
commit 772f7795b8ebed67224bd5b2f15b7c3e2bbf9ee0 1 parent d68176a
Alvaro Lopez Ortega authored January 04, 2012
2  cherokee/handler_cgi.c
@@ -98,8 +98,6 @@ read_from_cgi (cherokee_handler_cgi_base_t *cgi_base, cherokee_buffer_t *buffer)
98 98
 	case ret_eagain:
99 99
 		conn->polling_aim.fd   = cgi->pipeInput;
100 100
 		conn->polling_aim.mode = poll_mode_read;
101  
-
102  
-		cherokee_thread_deactive_to_polling (HANDLER_THREAD(cgi), conn);
103 101
 		return ret_eagain;
104 102
 
105 103
 	case ret_ok:
6  cherokee/handler_fcgi.c
@@ -172,12 +172,6 @@ read_from_fcgi (cherokee_handler_cgi_base_t *cgi, cherokee_buffer_t *buffer)
172 172
 	case ret_eagain:
173 173
 		conn->polling_aim.fd   = fcgi->socket.socket;
174 174
 		conn->polling_aim.mode = poll_mode_read;
175  
-
176  
-		ret = cherokee_thread_deactive_to_polling (HANDLER_THREAD(cgi), conn);
177  
-		if (unlikely (ret != ret_ok)) {
178  
-			cgi->got_eof = true;
179  
-			return ret_error;
180  
-		}
181 175
 		return ret_eagain;
182 176
 
183 177
 	case ret_ok:
44  cherokee/handler_proxy.c
@@ -638,11 +638,6 @@ do_connect (cherokee_handler_proxy_t *hdl)
638 638
 	case ret_eagain:
639 639
 		conn->polling_aim.fd   = hdl->pconn->socket.socket;
640 640
 		conn->polling_aim.mode = poll_mode_write;
641  
-
642  
-		ret = cherokee_thread_deactive_to_polling (HANDLER_THREAD(hdl), conn);
643  
-		if (ret != ret_ok) {
644  
-			return ret_deny;
645  
-		}
646 641
 		return ret_eagain;
647 642
 	default:
648 643
 		RET_UNKNOWN(ret);
@@ -711,13 +706,6 @@ send_post (cherokee_handler_proxy_t *hdl)
711 706
 
712 707
 			conn->polling_aim.fd   = hdl->pconn->socket.socket;
713 708
 			conn->polling_aim.mode = poll_mode_write;
714  
-
715  
-			ret = cherokee_thread_deactive_to_polling (HANDLER_THREAD(hdl), conn);
716  
-			if (ret != ret_ok) {
717  
-				hdl->pconn->keepalive_in = false;
718  
-				conn->error_code = http_bad_gateway;
719  
-				return ret_error;
720  
-			}
721 709
 			return ret_eagain;
722 710
 		default:
723 711
 			return ret_error;
@@ -759,13 +747,6 @@ send_post (cherokee_handler_proxy_t *hdl)
759 747
 
760 748
 			conn->polling_aim.fd   = hdl->pconn->socket.socket;
761 749
 			conn->polling_aim.mode = poll_mode_write;
762  
-
763  
-			ret = cherokee_thread_deactive_to_polling (HANDLER_THREAD(hdl), conn);
764  
-			if (ret != ret_ok) {
765  
-				hdl->pconn->keepalive_in = false;
766  
-				conn->error_code = http_bad_gateway;
767  
-				return ret_error;
768  
-			}
769 750
 			return ret_eagain;
770 751
 		default:
771 752
 			return ret_error;
@@ -797,13 +778,6 @@ send_post (cherokee_handler_proxy_t *hdl)
797 778
 
798 779
 			conn->polling_aim.fd   = hdl->pconn->socket.socket;
799 780
 			conn->polling_aim.mode = poll_mode_write;
800  
-
801  
-			ret = cherokee_thread_deactive_to_polling (HANDLER_THREAD(hdl), conn);
802  
-			if (ret != ret_ok) {
803  
-				hdl->pconn->keepalive_in = false;
804  
-				conn->error_code = http_bad_gateway;
805  
-				return ret_error;
806  
-			}
807 781
 			return ret_eagain;
808 782
 		default:
809 783
 			return ret_error;
@@ -857,13 +831,6 @@ send_post (cherokee_handler_proxy_t *hdl)
857 831
 
858 832
 		conn->polling_aim.fd   = conn->socket.socket;
859 833
 		conn->polling_aim.mode = poll_mode_read;
860  
-
861  
-		ret = cherokee_thread_deactive_to_polling (HANDLER_THREAD(hdl), conn);
862  
-		if (ret != ret_ok) {
863  
-			hdl->pconn->keepalive_in = false;
864  
-			conn->error_code = http_bad_gateway;
865  
-			return ret_error;
866  
-		}
867 834
 		return ret_eagain;
868 835
 	default:
869 836
 		return ret;
@@ -1163,13 +1130,6 @@ cherokee_handler_proxy_init (cherokee_handler_proxy_t *hdl)
1163 1130
 		case ret_eagain:
1164 1131
 			conn->polling_aim.fd   = hdl->pconn->socket.socket;
1165 1132
 			conn->polling_aim.mode = poll_mode_read;
1166  
-
1167  
-			ret = cherokee_thread_deactive_to_polling (HANDLER_THREAD(hdl), conn);
1168  
-			if (ret != ret_ok) {
1169  
-				hdl->pconn->keepalive_in = false;
1170  
-				conn->error_code = http_bad_gateway;
1171  
-				return ret_error;
1172  
-			}
1173 1133
 			return ret_eagain;
1174 1134
 		case ret_eof:
1175 1135
 		case ret_error:
@@ -1715,8 +1675,6 @@ cherokee_handler_proxy_step (cherokee_handler_proxy_t *hdl,
1715 1675
 		case ret_eagain:
1716 1676
 			conn->polling_aim.fd   = hdl->pconn->socket.socket;
1717 1677
 			conn->polling_aim.mode = poll_mode_read;
1718  
-
1719  
-			cherokee_thread_deactive_to_polling (HANDLER_THREAD(hdl), conn);
1720 1678
 			return ret_eagain;
1721 1679
 		default:
1722 1680
 			RET_UNKNOWN(ret);
@@ -1826,8 +1784,6 @@ cherokee_handler_proxy_step (cherokee_handler_proxy_t *hdl,
1826 1784
 		if (ret_read == ret_eagain) {
1827 1785
 			conn->polling_aim.fd   = hdl->pconn->socket.socket;
1828 1786
 			conn->polling_aim.mode = poll_mode_read;
1829  
-
1830  
- 			cherokee_thread_deactive_to_polling (HANDLER_THREAD(hdl), conn);
1831 1787
 			return ret_eagain;
1832 1788
 		}
1833 1789
 
2  cherokee/handler_scgi.c
@@ -148,8 +148,6 @@ read_from_scgi (cherokee_handler_cgi_base_t *cgi_base, cherokee_buffer_t *buffer
148 148
 	case ret_eagain:
149 149
 		conn->polling_aim.fd   = scgi->socket.socket;
150 150
 		conn->polling_aim.mode = poll_mode_read;
151  
-
152  
-		cherokee_thread_deactive_to_polling (HANDLER_THREAD(cgi_base), conn);
153 151
 		return ret_eagain;
154 152
 
155 153
 	case ret_ok:
5  cherokee/source.c
@@ -233,11 +233,6 @@ cherokee_source_connect_polling (cherokee_source_t     *src,
233 233
 	case ret_eagain:
234 234
 		conn->polling_aim.fd   = SOCKET_FD(socket);
235 235
 		conn->polling_aim.mode = poll_mode_write;
236  
-
237  
-		ret = cherokee_thread_deactive_to_polling (CONN_THREAD(conn), conn);
238  
-		if (ret != ret_ok) {
239  
-			return ret_deny;
240  
-		}
241 236
 		return ret_eagain;
242 237
 	case ret_error:
243 238
 		return ret_error;
5  cherokee/source_interpreter.c
@@ -713,11 +713,6 @@ cherokee_source_interpreter_connect_polling (cherokee_source_interpreter_t *src,
713 713
 		/* wait for the fd */
714 714
 		conn->polling_aim.fd   = SOCKET_FD(socket);
715 715
 		conn->polling_aim.mode = poll_mode_write;
716  
-
717  
-		ret = cherokee_thread_deactive_to_polling (CONN_THREAD(conn), conn);
718  
-		if (ret != ret_ok) {
719  
-			return ret_error;
720  
-		}
721 716
 		return ret_eagain;
722 717
 
723 718
 	case ret_deny:

0 notes on commit 772f779

Please sign in to comment.
Something went wrong with that request. Please try again.