mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add logging to client tailnet yamux (#11908)
Adds logging to yamux when used for tailnet client connections, e.g. CLI and wsproxy. This could be useful for debugging connection issues with tailnet v2 API.
This commit is contained in:
@@ -436,7 +436,10 @@ func (tac *tailnetAPIConnector) dial() (proto.DRPCTailnetClient, error) {
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
client, err := tailnet.NewDRPCClient(websocket.NetConn(tac.ctx, ws, websocket.MessageBinary))
|
||||
client, err := tailnet.NewDRPCClient(
|
||||
websocket.NetConn(tac.ctx, ws, websocket.MessageBinary),
|
||||
tac.logger,
|
||||
)
|
||||
if err != nil {
|
||||
tac.logger.Debug(tac.ctx, "failed to create DRPCClient", slog.Error(err))
|
||||
_ = ws.Close(websocket.StatusInternalError, "")
|
||||
|
||||
Reference in New Issue
Block a user