Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit c8859ab

Browse files
Fix #110 - enable asynchronous mode for Stream transport on Windows
1 parent 311733b commit c8859ab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Microsoft.AspNetCore.NodeServices/HostingModels/PhysicalConnections/NamedPipeConnection.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ internal class NamedPipeConnection : StreamConnection
1212
#pragma warning disable 1998 // Because in the NET451 code path, there's nothing to await
1313
public override async Task<Stream> Open(string address)
1414
{
15-
_namedPipeClientStream = new NamedPipeClientStream(".", address, PipeDirection.InOut);
15+
_namedPipeClientStream = new NamedPipeClientStream(
16+
".",
17+
address,
18+
PipeDirection.InOut,
19+
PipeOptions.Asynchronous);
20+
1621
#if NET451
1722
_namedPipeClientStream.Connect();
1823
#else
1924
await _namedPipeClientStream.ConnectAsync().ConfigureAwait(false);
2025
#endif
26+
2127
return _namedPipeClientStream;
2228
}
2329
#pragma warning restore 1998

0 commit comments

Comments
 (0)