浏览代码

add 504 to expected return codes, don't cache unexpected responses

jomo 9 年之前
父节点
当前提交
1ecf3c0122
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/networking.js

+ 2 - 0
lib/networking.js

@@ -90,6 +90,7 @@ exp.get_from_options = function(rid, url, options, callback) {
       case 429: // this shouldn't usually happen, but occasionally does
       case 500:
       case 503:
+      case 504:
         // we don't want to cache this
         body = null;
         break;
@@ -98,6 +99,7 @@ exp.get_from_options = function(rid, url, options, callback) {
           // Probably 500 or the likes
           logging.error(rid, "Unexpected response:", code, body);
         }
+        body = null;
         break;
     }