Fix poolmanager crashes when failed to list environment (#1432)

This commit is contained in:
Ta-Ching Chen
2019-11-24 05:59:38 +08:00
committed by GitHub
parent 1a5537f4ba
commit ccc551112b
+4 -3
View File
@@ -297,10 +297,11 @@ func (gpm *GenericPoolManager) eagerPoolCreator() {
if err != nil {
if utils.IsNetworkError(err) {
gpm.logger.Error("encountered network error, retrying", zap.Error(err))
time.Sleep(5 * time.Second)
continue
} else {
gpm.logger.Error("failed to get environment list", zap.Error(err))
}
gpm.logger.Error("failed to get environment list", zap.Error(err))
time.Sleep(5 * time.Second)
continue
}
// Create pools for all envs. TODO: we should make this a bit less eager, only