System.IO.Exception: Pipe is broken

后端 未结 3 805
夕颜
夕颜 2021-02-02 11:20

I have two .NET applications that talk to each other over a named pipe. Everything is great the first time through, but after the first message is sent, and the server is going

3条回答
  •  说谎
    说谎 (楼主)
    2021-02-02 11:58

    I had the same problem - it is caused by disposing server's StreamReader by Using...End Using, which also take down NamedPipeServerStream. Solution is simply don't Using...End Using it and trust in garbage collector.

提交回复
热议问题