Skip to content

Commit

Permalink
chore: modernize code
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke committed Dec 21, 2024
1 parent 7c53e74 commit 019d017
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/openvpn/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (c *Client) processClient(client connection.Client) error {
slog.String("session_state", client.SessionState),
)

ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
ctx, cancel := context.WithTimeout(c.ctx, 30*time.Second)
defer cancel()

switch client.Reason {
Expand Down Expand Up @@ -175,5 +175,5 @@ func (c *Client) clientEstablished(ctx context.Context, logger *slog.Logger, cli
func (c *Client) clientDisconnect(ctx context.Context, logger *slog.Logger, client connection.Client) {
logger.LogAttrs(ctx, slog.LevelInfo, "client disconnected")

c.oauth2.ClientDisconnect(c.ctx, logger, client)
c.oauth2.ClientDisconnect(ctx, logger, client)
}

0 comments on commit 019d017

Please sign in to comment.