Unverified Commit c5a91545 authored by Brian Downs's avatar Brian Downs Committed by GitHub

reset buffer after use (#4279) (#4330)

parent 174b3881
...@@ -243,7 +243,6 @@ RETRY: ...@@ -243,7 +243,6 @@ RETRY:
} }
files := make(bootstrap.PathsDataformat) files := make(bootstrap.PathsDataformat)
if err := json.NewDecoder(buf).Decode(&files); err != nil { if err := json.NewDecoder(buf).Decode(&files); err != nil {
// This will fail if data is being pulled from old an cluster since // This will fail if data is being pulled from old an cluster since
// older clusters used a map[string][]byte for the data structure. // older clusters used a map[string][]byte for the data structure.
...@@ -254,6 +253,7 @@ RETRY: ...@@ -254,6 +253,7 @@ RETRY:
return err return err
} }
} }
buf.Seek(0, 0)
type update struct { type update struct {
db, disk, conflict bool db, disk, conflict bool
......
...@@ -79,7 +79,8 @@ func (c *Cluster) initClusterAndHTTPS(ctx context.Context) error { ...@@ -79,7 +79,8 @@ func (c *Cluster) initClusterAndHTTPS(ctx context.Context) error {
// Create a HTTP server with the registered request handlers, using logrus for logging // Create a HTTP server with the registered request handlers, using logrus for logging
server := http.Server{ server := http.Server{
Handler: handler} Handler: handler,
}
if logrus.IsLevelEnabled(logrus.DebugLevel) { if logrus.IsLevelEnabled(logrus.DebugLevel) {
server.ErrorLog = log.New(logrus.StandardLogger().Writer(), "Cluster-Http-Server ", log.LstdFlags) server.ErrorLog = log.New(logrus.StandardLogger().Writer(), "Cluster-Http-Server ", log.LstdFlags)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment