Skip to content

Commit ce4cb52

Browse files
authored
Merge pull request #48 from jacqueskang/bugfix-namedpipes-cancellation
fix issue that cancellation request not work after WaitForConnectionA…
2 parents d2bf39b + 9f8e60a commit ce4cb52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/JKang.IpcServiceFramework.Server/NamedPipe/NamedPipeIpcServiceEndpoint.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ private void StartServerThread(object obj)
6060
var token = (CancellationToken)obj;
6161
try
6262
{
63-
using (var server = new NamedPipeServerStream(PipeName, PipeDirection.InOut, _options.ThreadCount))
63+
using (var server = new NamedPipeServerStream(PipeName, PipeDirection.InOut, _options.ThreadCount,
64+
PipeTransmissionMode.Byte, PipeOptions.Asynchronous))
6465
{
6566
server.WaitForConnectionAsync(token).Wait();
6667
ProcessAsync(server, _logger, token).Wait();

0 commit comments

Comments
 (0)