pass caller context by metadata to daemon

This commit is contained in:
shatoboar
2022-05-20 16:59:53 +02:00
parent 77e58295e7
commit 252f92c029
17 changed files with 209 additions and 147 deletions
+4 -3
View File
@@ -3,11 +3,12 @@ package server
import (
"context"
"fmt"
"google.golang.org/grpc/codes"
gstatus "google.golang.org/grpc/status"
"sync"
"time"
"google.golang.org/grpc/codes"
gstatus "google.golang.org/grpc/status"
log "github.com/sirupsen/logrus"
"github.com/netbirdio/netbird/client/internal"
@@ -91,7 +92,7 @@ func (s *Server) Start() error {
}
// Login uses setup key to prepare configuration for the daemon.
func (s *Server) Login(_ context.Context, msg *proto.LoginRequest) (*proto.LoginResponse, error) {
func (s *Server) Login(ctx context.Context, msg *proto.LoginRequest) (*proto.LoginResponse, error) {
s.mutex.Lock()
if s.actCancel != nil {
s.actCancel()