ipn: include err in Notify decode fatal path

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/1694/head
Brad Fitzpatrick 4 years ago
parent d5d70ae9ea
commit 8e4d1e3f2c

@ -243,7 +243,7 @@ func (bc *BackendClient) GotNotifyMsg(b []byte) {
} }
n := Notify{} n := Notify{}
if err := json.Unmarshal(b, &n); err != nil { if err := json.Unmarshal(b, &n); err != nil {
log.Fatalf("BackendClient.Notify: cannot decode message (length=%d)\n%#v", len(b), string(b)) log.Fatalf("BackendClient.Notify: cannot decode message (length=%d, %#q): %v", len(b), b, err)
} }
if n.Version != version.Long && !bc.AllowVersionSkew { if n.Version != version.Long && !bc.AllowVersionSkew {
vs := fmt.Sprintf("GotNotify: Version mismatch! frontend=%#v backend=%#v", vs := fmt.Sprintf("GotNotify: Version mismatch! frontend=%#v backend=%#v",

Loading…
Cancel
Save