Skip to content

Commit

Permalink
Merge pull request deis#4291 from krancour/fix-logspout-deadlock
Browse files Browse the repository at this point in the history
fix(logspout): fix deadlock when attaching
  • Loading branch information
krancour committed Aug 19, 2015
2 parents a08d433 + 06f301f commit bd5f008
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion logspout/attacher.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ func (m *AttachManager) Listen(source *Source, logstream chan *Log, closer <-cha
if source == nil {
source = new(Source)
}
events := make(chan *AttachEvent)
depth := len(m.attached)
if depth == 0 {
depth = 1
}
events := make(chan *AttachEvent, depth)
m.addListener(events)
defer m.removeListener(events)
for {
Expand Down

0 comments on commit bd5f008

Please sign in to comment.