fixes
This commit is contained in:
@@ -3,6 +3,7 @@ package server
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
@@ -49,6 +50,7 @@ func NewServer(conf *Config, logger *fluentd.Logger, db *pgxpool.Pool /*, ebCh *
|
||||
ReadTimeout: time.Millisecond * 50,
|
||||
WriteTimeout: time.Millisecond * 50,
|
||||
IdleTimeout: time.Millisecond * 50,
|
||||
// Prefork: true,
|
||||
}
|
||||
s := &Server{
|
||||
fiber.New(cnf),
|
||||
@@ -122,6 +124,10 @@ func (s *Server) updateKVConfig() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if config == nil {
|
||||
return errors.New("empty KV config data")
|
||||
}
|
||||
|
||||
buf := bytes.NewBuffer(config.Value)
|
||||
decoder := json.NewDecoder(buf)
|
||||
if err := decoder.Decode(&s.conf); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user