Skip to content
Snippets Groups Projects
Commit f104313b authored by Jonah Husson's avatar Jonah Husson
Browse files

set gateway auth

parent d73e2901
No related branches found
No related tags found
No related merge requests found
......@@ -31,8 +31,14 @@ func (nb *Impl) TrackNdf() {
gatewayEventHandler := func(ndf pb.NDF) []byte {
jww.DEBUG.Printf("Updating Gateways with new NDF")
// TODO: If this returns an error, print that error if it occurs
nb.inst.UpdatePartialNdf(&ndf)
nb.inst.UpdateGatewayConnections()
err := nb.inst.UpdatePartialNdf(&ndf)
if err != nil {
jww.ERROR.Printf("Failed to update partial NDF: %+v", err)
}
err = nb.inst.UpdateGatewayConnections()
if err != nil {
jww.ERROR.Printf("Failed to update gateway connections: %+v", err)
}
return nb.inst.GetFullNdf().GetHash()
}
......
......@@ -95,6 +95,7 @@ func StartNotifications(params Params, noTLS, noFirebase bool) (*Impl, error) {
if err != nil {
return nil, errors.WithMessage(err, "Failed to start instance")
}
i.SetGatewayAuthentication()
impl.inst = i
return impl, nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment