Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ValyaB committed Sep 27, 2024
1 parent 29fee6a commit 4ca41bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/proxy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (c *Client) sendInitialRequest(stream cloudproxyv1alpha.CloudProxyAPI_Strea
if err != nil {
return fmt.Errorf("stream.Send: initial request %w", err)
}
c.lastSeenReceive.Store(time.Now().UnixNano())
c.lastSeenSend.Store(time.Now().UnixNano())

c.log.Info("Stream to castai started successfully")

Expand Down Expand Up @@ -274,6 +274,7 @@ func (c *Client) receive(ctx context.Context, stream cloudproxyv1alpha.CloudProx
return fmt.Errorf("stream.Recv: %w", err)
}

c.lastSeenReceive.Store(time.Now().UnixNano())
c.log.Debugf("Handling message from castai")
go c.handleMessage(stream.Context(), in, respCh)
}
Expand All @@ -285,7 +286,6 @@ func (c *Client) handleMessage(ctx context.Context, in *cloudproxyv1alpha.Stream
return
}

c.lastSeenReceive.Store(time.Now().UnixNano())
c.processConfigurationRequest(in)

// skip processing http request if keep alive message.
Expand Down

0 comments on commit 4ca41bc

Please sign in to comment.