fix possibly reporting timeout as "aborted by user" (bnc#665327)
authorMichael Andres <ma@suse.de>
Thu, 5 Jul 2012 11:52:23 +0000 (13:52 +0200)
committerMichael Andres <ma@suse.de>
Thu, 5 Jul 2012 11:52:23 +0000 (13:52 +0200)
zypp/media/MediaCurl.cc

index 8165d74..599e145 100644 (file)
@@ -1009,9 +1009,11 @@ void MediaCurl::evaluateCurlCode( const Pathname &filename,
         err = "Write error";
         break;
       case CURLE_PARTIAL_FILE:
-      case CURLE_ABORTED_BY_CALLBACK:
       case CURLE_OPERATION_TIMEDOUT:
-        if( timeout_reached)
+       timeout_reached = true; // fall though to TimeoutException
+       // fall though...
+      case CURLE_ABORTED_BY_CALLBACK:
+         if( timeout_reached )
         {
           err  = "Timeout reached";
           ZYPP_THROW(MediaTimeoutException(url));