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
+3 -2
View File
@@ -297,11 +297,12 @@ func (gpm *GenericPoolManager) eagerPoolCreator() {
if err != nil { if err != nil {
if utils.IsNetworkError(err) { if utils.IsNetworkError(err) {
gpm.logger.Error("encountered network error, retrying", zap.Error(err)) gpm.logger.Error("encountered network error, retrying", zap.Error(err))
} else {
gpm.logger.Error("failed to get environment list", zap.Error(err))
}
time.Sleep(5 * time.Second) time.Sleep(5 * time.Second)
continue continue
} }
gpm.logger.Error("failed to get environment list", zap.Error(err))
}
// Create pools for all envs. TODO: we should make this a bit less eager, only // Create pools for all envs. TODO: we should make this a bit less eager, only
// creating pools for envs that are actually used by functions. Also we might want // creating pools for envs that are actually used by functions. Also we might want