Skip to content

Commit

Permalink
ciao-scheduler: Send node disconnect messaged with correct type
Browse files Browse the repository at this point in the history
Messages for both node connected and disconnected were being erroneously
sent with a type of ssntp.NodeConnected. This meant controller was not
correctly noticing when nodes were being disconnected.

Signed-off-by: Rob Bradford <[email protected]>
  • Loading branch information
rbradford committed Aug 9, 2017
1 parent 15fb864 commit bf29aeb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ciao-scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ func (sched *ssntpSchedulerServer) sendNodeConnectionEvents(nodeUUID string, nod
defer sched.controllerMutex.RUnlock()

for _, ctl := range sched.controllerMap {
sched.ssntp.SendEvent(ctl.uuid, ssntp.NodeConnected, b)
if connected {
sched.ssntp.SendEvent(ctl.uuid, ssntp.NodeConnected, b)
} else {
sched.ssntp.SendEvent(ctl.uuid, ssntp.NodeDisconnected, b)
}
}
}

Expand Down

0 comments on commit bf29aeb

Please sign in to comment.