mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
reset buffer after use (#4279)
This commit is contained in:
parent
02a314c69a
commit
0a0b915921
@ -243,7 +243,6 @@ RETRY:
|
||||
}
|
||||
|
||||
files := make(bootstrap.PathsDataformat)
|
||||
|
||||
if err := json.NewDecoder(buf).Decode(&files); err != nil {
|
||||
// This will fail if data is being pulled from old an cluster since
|
||||
// older clusters used a map[string][]byte for the data structure.
|
||||
@ -254,6 +253,7 @@ RETRY:
|
||||
return err
|
||||
}
|
||||
}
|
||||
buf.Seek(0, 0)
|
||||
|
||||
type update struct {
|
||||
db, disk, conflict bool
|
||||
|
@ -80,7 +80,8 @@ func (c *Cluster) initClusterAndHTTPS(ctx context.Context) error {
|
||||
|
||||
// Create a HTTP server with the registered request handlers, using logrus for logging
|
||||
server := http.Server{
|
||||
Handler: handler}
|
||||
Handler: handler,
|
||||
}
|
||||
|
||||
if logrus.IsLevelEnabled(logrus.DebugLevel) {
|
||||
server.ErrorLog = log.New(logrus.StandardLogger().Writer(), "Cluster-Http-Server ", log.LstdFlags)
|
||||
|
Loading…
Reference in New Issue
Block a user