Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! fix: don't use yamux for in-memory provisioner{,d} streams
  • Loading branch information
coadler committed Nov 19, 2022
commit 9a6ea3f3cd7c7a6d26d487b5da62f93e7a8a5e90
8 changes: 5 additions & 3 deletions provisionersdk/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package provisionersdk
import (
"context"
"net"
"sync"

"github.com/hashicorp/yamux"
"github.com/valyala/fasthttp/fasthttputil"
Expand Down Expand Up @@ -73,12 +74,13 @@ func MemTransportPipe() (drpc.Conn, net.Listener) {
}

type memDRPC struct {
closed chan struct{}
l *fasthttputil.InmemoryListener
closeOnce sync.Once
closed chan struct{}
l *fasthttputil.InmemoryListener
}

func (m *memDRPC) Close() error {
close(m.closed)
m.closeOnce.Do(func() { close(m.closed) })
return m.l.Close()
}

Expand Down