diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-09-11 01:54:48 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-09-11 01:54:48 +0000 |
commit | 24662bcab45cdff410c7082c5c8247b67df5c9f5 (patch) | |
tree | 788b8b21ee0c13cb07e57a1ad2fef646db00b55e /apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp | |
parent | 0fd2bdc23d5a69c00d914d92bacfaec83bb509c9 (diff) | |
download | ATCD-24662bcab45cdff410c7082c5c8247b67df5c9f5.tar.gz |
ChangeLogTag:Mon Sep 10 18:59:24 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
Diffstat (limited to 'apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp')
-rw-r--r-- | apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp b/apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp index 26a794c9902..826a7331f05 100644 --- a/apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp +++ b/apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp @@ -70,9 +70,20 @@ Consumer_Handler::nonblk_put (ACE_Message_Block *event) ssize_t n = this->send (event); - - if (n == -1 && errno == EWOULDBLOCK) // Didn't manage to send everything. + if (n == -1) { + // -1 is returned only when things have really gone wrong (i.e., + // not when flow control occurs). Thus, let's try to close down + // and set up a new reconnection by calling handle_close(). + this->state (Connection_Handler::FAILED); + this->handle_close (); + return -1; + } + eise if (errno == EWOULDBLOCK) + { + // We didn't manage to send everything, so we need to queue + // things up. + ACE_DEBUG ((LM_DEBUG, "(%t) queueing activated on handle %d to routing id %d\n", this->get_handle (), @@ -95,16 +106,8 @@ Consumer_Handler::nonblk_put (ACE_Message_Block *event) -1); return 0; } - else if (n == -1) - { - // Things have gone wrong, let's try to close down and set up a - // new reconnection by calling handle_close(). - this->state (Connection_Handler::FAILED); - this->handle_close (); - return -1; - } - - return n; + else + return n; } ssize_t |