Skip to content
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

Broken error handling #7

Open
mdavid626 opened this issue Apr 19, 2016 · 1 comment
Open

Broken error handling #7

mdavid626 opened this issue Apr 19, 2016 · 1 comment

Comments

@mdavid626
Copy link

If I start a server instance

var server = new NamedPipeServer<TestClass>("MyServerPipe");
server.Start();

the failure of pipe creation is not detectable. There can be an error (for example the pipe is busy), which is simply written to console output, but no events are thrown (Error). This code causes the problem:

while (this._shouldKeepRunning)
    this.WaitForConnection(this._pipeName);

in this.WaitForConnections this can fail:

pipe1 = PipeServerFactory.CreateAndConnectPipe(pipeName) 

and then the error is handled in try catch, but while cycle keeps running and tries again and no error event is thrown.

So how to detect if server.Start was unsuccessful?

Thanks.

@IanStorm
Copy link

Same issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants