Browse Source

directly evaluate *read_result to see if there was an error

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac296@2752 e5f2f494-b856-4b98-b285-d166d9295462
Jelte Jansen 14 years ago
parent
commit
8320cc9dab
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lib/cc/session.cc

+ 2 - 1
src/lib/cc/session.cc

@@ -198,7 +198,8 @@ SessionImpl::readData(void* data, size_t datalen) {
             }
             }
         }
         }
 
 
-        if (read_result->value() != 0) {
+        // asio::error_code evaluates to false if there was no error
+        if (*read_result) {
             if (*read_result == asio::error::operation_aborted) {
             if (*read_result == asio::error::operation_aborted) {
                 isc_throw(SessionTimeout,
                 isc_throw(SessionTimeout,
                           "Timeout while reading data from cc session");
                           "Timeout while reading data from cc session");