dotnet/runtime

`NamedPipeServerStream` recieves empty string from client

Open

#112,912 建立於 2025年2月25日

在 GitHub 查看
 (1 留言) (1 反應) (0 負責人)C# (5,445 fork)batch import
area-System.IOhelp wanted

倉庫指標

Star
 (17,886 star)
PR 合併指標
 (平均合併 12天 11小時) (30 天內合併 661 個 PR)

描述

Description

When a named pipe client sends a string, System.IO.Pipes.NamedPipeServerStream in my application sometimes, usually the first request after application started running, gets it as a empty string "" from the StreamReader.

Reproduction Steps

Created a repository to reproduce the issue. Note that my client is written in Rust. https://github.com/U-C-S/NamedPipesWindows-IssueRepro

Expected behavior

Named Pipe Server should get the string from client as it is, on all occasions.

Actual behavior

Named Pipe Server gets an empty string occasionally from client, even when client certainly is sending a non-empty string, usually on first launch of the application the server is part of.

image

Regression?

No response

Known Workarounds

No response

Configuration

  • .NET SDK version: 8.0.404
  • OS and version: Windows 11 stable build 26100.3194
  • architecture: x64
  • Do you know whether it is specific to that configuration? - No

Other information

No response

貢獻者指南