Browse Source

Merge pull request #5344 from weseek/fix/condition-for-reconnecting-to-search

fix: The condition to attempt to reconnect to Elasticsearch
Yuki Takei 4 years ago
parent
commit
3c47c8b3f8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/app/src/server/middlewares/auto-reconnect-to-search.js

+ 1 - 1
packages/app/src/server/middlewares/auto-reconnect-to-search.js

@@ -21,7 +21,7 @@ module.exports = (crowi) => {
   };
   };
 
 
   return (req, res, next) => {
   return (req, res, next) => {
-    if (searchService != null && !searchService.isReachable) {
+    if (searchService != null && searchService.isConfigured && !searchService.isReachable) {
       // NON-BLOCKING CALL
       // NON-BLOCKING CALL
       // for the latency of the response
       // for the latency of the response
       nextTick(reconnectContext, reconnectHandler);
       nextTick(reconnectContext, reconnectHandler);