mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: don't use yamux for in-memory provisioner{,d} streams (#5136)
This commit is contained in:
+2
-2
@@ -644,7 +644,7 @@ func compressHandler(h http.Handler) http.Handler {
|
||||
// CreateInMemoryProvisionerDaemon is an in-memory connection to a provisionerd. Useful when starting coderd and provisionerd
|
||||
// in the same process.
|
||||
func (api *API) CreateInMemoryProvisionerDaemon(ctx context.Context, debounce time.Duration) (client proto.DRPCProvisionerDaemonClient, err error) {
|
||||
clientSession, serverSession := provisionersdk.TransportPipe()
|
||||
clientSession, serverSession := provisionersdk.MemTransportPipe()
|
||||
defer func() {
|
||||
if err != nil {
|
||||
_ = clientSession.Close()
|
||||
@@ -705,5 +705,5 @@ func (api *API) CreateInMemoryProvisionerDaemon(ctx context.Context, debounce ti
|
||||
_ = serverSession.Close()
|
||||
}()
|
||||
|
||||
return proto.NewDRPCProvisionerDaemonClient(provisionersdk.Conn(clientSession)), nil
|
||||
return proto.NewDRPCProvisionerDaemonClient(clientSession), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user