Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
c5a91545
Unverified
Commit
c5a91545
authored
Oct 26, 2021
by
Brian Downs
Committed by
GitHub
Oct 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reset buffer after use (#4279) (#4330)
parent
174b3881
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
bootstrap.go
pkg/cluster/bootstrap.go
+1
-1
https.go
pkg/cluster/https.go
+2
-1
No files found.
pkg/cluster/bootstrap.go
View file @
c5a91545
...
@@ -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
...
...
pkg/cluster/https.go
View file @
c5a91545
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment