瀏覽代碼

Fix reindex NPE when http is disabled

Ryan Ernst 9 年之前
父節點
當前提交
4ea5f51a9c

+ 1 - 1
modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportReindexAction.java

@@ -109,7 +109,7 @@ public class TransportReindexAction extends HandledTransportAction<ReindexReques
 
     private void checkRemoteWhitelist(RemoteInfo remoteInfo) {
         TransportAddress publishAddress = null;
-        HttpInfo httpInfo = httpServer.info();
+        HttpInfo httpInfo = httpServer == null ? null : httpServer.info();
         if (httpInfo != null && httpInfo.getAddress() != null) {
             publishAddress = httpInfo.getAddress().publishAddress();
         }