Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Cloud
MAS
clonemap
Commits
6bd21675
Commit
6bd21675
authored
May 13, 2021
by
Stefan Dähling
Browse files
fix ineffective break statements
parent
f82747df
Pipeline
#467016
passed with stages
in 11 minutes and 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pkg/client/logger.go
View file @
6bd21675
...
...
@@ -226,10 +226,14 @@ func (logCol *LogCollector) storeState() (err error) {
states
=
append
(
states
,
state
)
for
i
:=
0
;
i
<
24
;
i
++
{
// maximum of 25 states
done
:=
false
select
{
case
state
=
<-
logCol
.
stateIn
:
states
=
append
(
states
,
state
)
default
:
done
=
true
}
if
done
{
break
}
}
...
...
pkg/logger/cassandra.go
View file @
6bd21675
...
...
@@ -278,6 +278,7 @@ func (stor *cassStorage) storeLogs(topic string) {
if
size
>
25000
{
break
}
empty
:=
false
select
{
case
log
=
<-
logIn
:
js
,
err
=
json
.
Marshal
(
log
)
...
...
@@ -287,6 +288,9 @@ func (stor *cassStorage) storeLogs(topic string) {
batch
.
Query
(
stmt
,
log
.
MASID
,
log
.
AgentID
,
log
.
Timestamp
,
js
)
size
+=
len
(
js
)
default
:
empty
=
true
}
if
empty
{
break
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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