Skip to content

Commit

Permalink
Pull request 2039: 6304-fix-ring-buffer
Browse files Browse the repository at this point in the history
Updates #6304.

Squashed commit of the following:

commit 7382630
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Oct 12 19:37:01 2023 +0300

    all: upd chlog

commit ff9a82a
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Oct 12 19:27:35 2023 +0300

    querylog: fix ring buffer
  • Loading branch information
schzhn committed Oct 12, 2023
1 parent d3fabdd commit bb652cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ See also the [v0.107.40 GitHub milestone][ms-v0.107.40].
NOTE: Add new changes BELOW THIS COMMENT.
-->

### Fixed

- Panic on clearing query log ([#6304]).

[#6304]: https://github.com/AdguardTeam/AdGuardHome/issues/6304

<!--
NOTE: Add new changes ABOVE THIS COMMENT.
-->
Expand Down
2 changes: 1 addition & 1 deletion internal/querylog/qlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (l *queryLog) clear() {
l.bufferLock.Lock()
defer l.bufferLock.Unlock()

l.buffer = nil
l.buffer.Clear()
l.flushPending = false
}()

Expand Down

0 comments on commit bb652cd

Please sign in to comment.