mirror of
https://github.com/rancher/steve.git
synced 2025-09-10 20:00:23 +00:00
Add context to the remotedialer ping logger - steve side. (#577)
* Add context to the remotedialer ping logger - steve side. * Use a custom type as a context key instead of a basic string * Bump remotedialer so it can use the configured context.
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"strings"
|
||||
@@ -72,6 +73,7 @@ func serve(ctx context.Context, dialer websocket.Dialer, url string, headers htt
|
||||
return err
|
||||
}
|
||||
defer conn.Close()
|
||||
ctx = context.WithValue(ctx, remotedialer.ContextKeyCaller, fmt.Sprintf("steve server: url:%s", url))
|
||||
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
|
Reference in New Issue
Block a user