Permalink
Browse files

The Information Sources mechanism was broken on systems where

"localhost" resolves to ::1 before 127.0.0.1. This fix should take
care of it. BEWARE: This is an intrusive patch that could introduce
regressions.
  • Loading branch information...
1 parent 80ce616 commit 07ad2c66899eff1f3af5dbfe73f02bd791f7ba2f @alobbs alobbs committed Nov 20, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 cherokee/source_interpreter.c
View
8 cherokee/source_interpreter.c
@@ -724,6 +724,14 @@ cherokee_source_interpreter_connect_polling (cherokee_source_interpreter_t *src,
/* reset by peer: spawn process? */
TRACE (ENTRIES, "Connection refused (closing fd=%d)\n", socket->socket);
cherokee_socket_close (socket);
+
+ /* Try the next address quickly, if any */
+ if (SOURCE(src)->addr_current) {
+ SOURCE(src)->addr_current = SOURCE(src)->addr_current->ai_next;
+ if (SOURCE(src)->addr_current) {
+ return ret_eagain;
+ }
+ }
break;
default:

0 comments on commit 07ad2c6

Please sign in to comment.