Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.

Commit 8477a84

Browse files
committed
Revert "broker: Fatal error when a networkserver token can't be read"
This reverts commit 33b404a.
1 parent 33b404a commit 8477a84

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

cmd/broker.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
ttnlog "github.com/TheThingsNetwork/go-utils/log"
1818
"github.com/TheThingsNetwork/ttn/core/broker"
1919
"github.com/TheThingsNetwork/ttn/core/component"
20-
"github.com/dgrijalva/jwt-go"
2120
"github.com/spf13/cobra"
2221
"github.com/spf13/viper"
2322
)
@@ -57,11 +56,7 @@ var brokerCmd = &cobra.Command{
5756
broker := broker.NewBroker(
5857
time.Duration(viper.GetInt("broker.deduplication-delay")) * time.Millisecond,
5958
)
60-
nsToken := viper.GetString("broker.networkserver-token")
61-
if _, err := jwt.Parse(nsToken, func(*jwt.Token) (interface{}, error) { return nil, nil }); nsToken != "" && err != nil {
62-
ctx.WithError(err).Fatal("Could not read networkserver token")
63-
}
64-
broker.SetNetworkServer(viper.GetString("broker.networkserver-address"), nsCert, nsToken)
59+
broker.SetNetworkServer(viper.GetString("broker.networkserver-address"), nsCert, viper.GetString("broker.networkserver-token"))
6560
err = broker.Init(component)
6661
if err != nil {
6762
ctx.WithError(err).Fatal("Could not initialize broker")

0 commit comments

Comments
 (0)