Skip to content

Commit

Permalink
Fix stall on non-batched outputs with batches
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffail committed Mar 26, 2021
1 parent abc05af commit b68ddf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.

## Unreleased

## 3.42.1 - 2021-03-26

### Fixed

- Fixed a potential pipeline stall that would occur when non-batched outputs receive message batches.

## 3.42.0 - 2021-02-22

### New
Expand Down
5 changes: 1 addition & 4 deletions lib/output/not_batched.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,11 @@ func (n *notBatchedOutput) Connected() bool {

func (n *notBatchedOutput) CloseAsync() {
n.close()
n.fullyClose()
}

// WaitForClose blocks until the File output has closed down.
func (n *notBatchedOutput) WaitForClose(timeout time.Duration) error {
go func() {
<-time.After(timeout - time.Second)
n.fullyClose()
}()
select {
case <-n.closedChan:
case <-time.After(timeout):
Expand Down

0 comments on commit b68ddf4

Please sign in to comment.