-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The server stops working #27
Comments
Ok, I'm waiting. |
There is another problem with the current server code when establishing a connection.
and then
So we first send the client's connection name and then create a pipe with that name. If the client is fast (like C ++ code) it will read the name and try to connect before the server creates a pipe for client.... |
I looked at the code and I think that a similar problem will also occur in the client. |
I believe I ran into the same issue just now and can even kill the pipe (permanently, with no notice whatsoever) by accident. Is there a known workaround? |
@darklajid as a temporary you can use the server file with my fixes https://gist.github.com/alexeygritsenko/37499d4a5f36c31bf6db08e95675af8f |
Thanks for bringing this up. I will take a look now |
For now I added a test for this case and confirmed the issue. |
On top of the handshake issue (or maybe it's doing the same thing?) I also managed to kill the pipe without an error on the server side by running either accesschk or pipelist from the sysinternals suite (I ran both to figure out ACL issues and forgot which caused it: For one run the pipe is there, afterwards it's gone for good). |
Describe the bug
I am looking for a reliable named pipes server for communication between C ++ and C #.
Unfortunately, the H.Pipes server can easily crash due to an error in the client.
Here's an example code that shows how to make the server stop responding to new connections:
Steps to reproduce the bug
Expected behavior
No response
Screenshots
No response
NuGet package version
No response
Platform
No response
IDE
No response
Additional context
Why is this happening?
After establishing the connection by the client, the server sends the name of the pipe created for the client through the main pipe.
The server then waits for the client to establish a connection to the newly created pipe, but unfortunately the main pipe is closed.
If the client fails to connect, the main pipe will not be recreated and you will not be able to connect to the server anymore.
So one malfunctioning client can therefore block the server.
The text was updated successfully, but these errors were encountered: