Skip to content

Commit

Permalink
Added fix for race condition which leads to channels blocking on writ…
Browse files Browse the repository at this point in the history
…e due to zero length.
  • Loading branch information
wolfeidau committed Sep 10, 2014
1 parent 297f3cb commit 2b5cd7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions upnp/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ func (this *upnpDefaultReactor) ServeHTTP(writer http.ResponseWriter, request *h
func MakeReactor() Reactor {
reactor := &upnpDefaultReactor{}
reactor.eventMap = make(upnpEventMap)
reactor.subscrChan = make(chan *upnpEventRecord)
reactor.unpackChan = make(chan *upnpEvent)
reactor.eventChan = make(chan Event)
reactor.subscrChan = make(chan *upnpEventRecord, 1)
reactor.unpackChan = make(chan *upnpEvent, 1)
reactor.eventChan = make(chan Event, 1)
return reactor
}

0 comments on commit 2b5cd7e

Please sign in to comment.