瀏覽代碼

Timeout cURL to avoid perma-hang

Zachary Kotlarek 12 年之前
父節點
當前提交
a5a16ca6ab
共有 1 個文件被更改,包括 1 次插入 和 1 次删除
  1. 1 1
      yt/subscribe.pl

+ 1 - 1
yt/subscribe.pl

@@ -18,7 +18,7 @@ use PrettyPrint;
 # Paramters
 my $EXTRAS_FILE = 'extra_videos.ini';
 my $CURL_BIN    = 'curl';
-my @CURL_ARGS   = ('-4', '--insecure', '-C', '-');
+my @CURL_ARGS   = ('-4', '--insecure', '-C', '-', '--connect-timeout', '10', '--max-time', '600');
 my $BATCH_SIZE  = 50;
 my $MAX_INDEX   = 2500;
 my $API_URL     = 'https://gdata.youtube.com/feeds/api/';