Code review comment for lp:~themue/juju-core/go-worker-firewaller-machines

Roger Peppe (rogpeppe) wrote :
File worker/firewaller/firewaller.go (right):
worker/firewaller/firewaller.go:139: case mt.changes <-
&machineUnitsChange{mt, change}:
On 2012/07/18 13:56:01, niemeyer wrote:
> What happens if mt.changes is closed?

> We have to keep that kind of concern in mind when working with

AFAICS mt.changes is the same channel as machineUnitsChanges, which
there's no reason to close ever IMO (although I see that it is closed in
fact - i'd remove that).
I suggest putting machineUnitsChanges inside the firewaller type, so
this line would be:
case mt.firewaller.machineUnitsChanges <- ...

which makes the mux logic more clear, i think.

« Back to merge proposal