mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-19 23:11:29 +02:00
fixed a couple of issues flagged by coderabbit
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
@@ -109,7 +109,7 @@ func (c *GRPCClient) Close() error {
|
||||
func (c *GRPCClient) Send(event *proto.FlowEvent) error {
|
||||
c.mu.Lock()
|
||||
stream := c.stream
|
||||
c.mu.Unlock()
|
||||
defer c.mu.Unlock() // stream.Send() is not safe to call concurrently from multiple goroutines
|
||||
|
||||
if stream == nil {
|
||||
return errors.New("stream not initialized")
|
||||
|
||||
Reference in New Issue
Block a user