Skip to content

Commit

Permalink
session: Explicitly use non-flat session mode for the time being (maf…
Browse files Browse the repository at this point in the history
…redri#106)

CDP will eventually default to using flat sessions, for now we
explicitly disable flattening until we can add support for it in the
session package.

See https://bugs.chromium.org/p/chromium/issues/detail?id=991325.
  • Loading branch information
powdercloud authored and mafredri committed Sep 4, 2019
1 parent 2a28a12 commit 6f2377a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ var (
// the underlying *rpcc.Conn for the provided *cdp.Client.
func dial(ctx context.Context, id target.ID, tc *cdp.Client, detachTimeout time.Duration) (s *session, err error) {
args := target.NewAttachToTargetArgs(id)
// The default of this flag will change to true, so until CDP
// uses flat session mode, we set this to false explicitly.
// See https://bugs.chromium.org/p/chromium/issues/detail?id=991325.
args.SetFlatten(false)
reply, err := tc.Target.AttachToTarget(ctx, args)
if err != nil {
return nil, err
Expand Down

0 comments on commit 6f2377a

Please sign in to comment.