Skip to content

Commit db662ba

Browse files
committedAug 24, 2017
fix eventsMonitor restart after removed the engine
Signed-off-by: Hubery <[email protected]>
1 parent 1e67ee4 commit db662ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎cluster/event_monitor.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ type EventsMonitor struct {
1717
// NewEventsMonitor returns an EventsMonitor
1818
func NewEventsMonitor(cli swarmclient.SwarmAPIClient, handler func(msg events.Message) error) *EventsMonitor {
1919
return &EventsMonitor{
20-
cli: cli,
21-
handler: handler,
20+
cli: cli,
21+
handler: handler,
22+
stopChan: make(chan struct{}),
2223
}
2324
}
2425

2526
// Start starts the EventsMonitor
2627
func (em *EventsMonitor) Start(ec chan error) {
27-
em.stopChan = make(chan struct{})
2828
ctx, cancel := context.WithCancel(context.Background())
2929
responseStream, errStream := em.cli.Events(ctx, types.EventsOptions{})
3030

0 commit comments

Comments
 (0)