diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-05-28 04:35:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-27 22:35:44 +0200 |
commit | 0d54395fb544d52585046bf0424659cec0626e31 (patch) | |
tree | 64eeecb8be5a48c0486681f5195a6a302ec44518 /CODE_OF_CONDUCT.md | |
parent | 7314726babecb04da7f5e38db79c2115f8eedafe (diff) | |
download | gitea-0d54395fb544d52585046bf0424659cec0626e31.tar.gz gitea-0d54395fb544d52585046bf0424659cec0626e31.zip |
Improve logger Pause handling (#24946)
The old EventWriter's Run does:
```go
for {
handlePause()
select {
case event <- Queue:
write the log event ...
}
}
```
So, if an event writer is started before the logger is paused, there is
a chance that the logger isn't paused for the first message.
The new logic is:
```go
for {
select {
case event <- Queue:
handlePause()
write the log event ...
}
}
```
Then the event writer can be correctly paused
Diffstat (limited to 'CODE_OF_CONDUCT.md')
0 files changed, 0 insertions, 0 deletions