- Added a 60sec connext timeout (#172860)
authorMarius Tomaschewski <mt@suse.de>
Fri, 5 May 2006 15:46:32 +0000 (15:46 +0000)
committerMarius Tomaschewski <mt@suse.de>
Fri, 5 May 2006 15:46:32 +0000 (15:46 +0000)
zypp/media/MediaCurl.cc

index 4c7c8d3..9500f87 100644 (file)
@@ -236,6 +236,15 @@ void MediaCurl::attachTo (bool next)
   }
   */
 
+  /*
+  ** Connect timeout
+  */
+  ret = curl_easy_setopt( _curl, CURLOPT_CONNECTTIMEOUT, 60);
+  if ( ret != 0 ) {
+    disconnectFrom();
+    ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
+  }
+
   if ( _url.getScheme() == "http" ) {
     // follow any Location: header that the server sends as part of
     // an HTTP header (#113275)