Skip to content

Commit

Permalink
comments about retrying downstream requests
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyen committed Apr 23, 2009
1 parent 9753128 commit abe1a8c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cproxy.c
Expand Up @@ -318,10 +318,12 @@ void cproxy_on_close_downstream_conn(conn *c) {
// If we haven't received any reply yet, we retry.
//
// We sometimes see drive_machine/transmit not see a
// closed connection error during conn_mwrite. Instead,
// it moves the state forward trying to read from the
// downstream conn (conn_new_cmd, conn_read, etc), and
// only then do we see the conn close situation,
// closed connection error during conn_mwrite, possibly
// due to non-blocking sockets. Because of this, drive_machine
// thinks it has a successful downstream request send and
// moves the state forward trying to read a response from
// the downstream conn (conn_new_cmd, conn_read, etc), and
// only then do we finally see the conn close situation,
// ending up here. That is, drive_machine only
// seems to move to conn_closing from conn_read.
//
Expand Down Expand Up @@ -360,7 +362,7 @@ void cproxy_on_close_downstream_conn(conn *c) {
//
if (uc_retry != NULL) {
if (settings.verbose > 1)
fprintf(stderr, "No reply received, retrying\n");
fprintf(stderr, "%d cproxy retrying\n", uc_retry->sfd);

assert(uc_retry->thread);
assert(uc_retry->thread->work_queue);
Expand Down

0 comments on commit abe1a8c

Please sign in to comment.