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

Connection failed: Returned by server pipeName is null #80

Open
mogikanin opened this issue Nov 8, 2024 · 1 comment
Open

Connection failed: Returned by server pipeName is null #80

mogikanin opened this issue Nov 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mogikanin
Copy link

mogikanin commented Nov 8, 2024

Describe the bug

Hi, we have a some amount of such exceptions on our production. Not so many (less than 1% of users), comparing to entire installations count. As usual we never got this exception locally :)
System.InvalidOperationException: Connection failed: Returned by server pipeName is null.

Here the stack trace

System.InvalidOperationException: Connection failed: Returned by server pipeName is null
File "//src/libs/H.Pipes/PipeClient.cs", line 301, col 17, in async Task PipeClient.GetConnectionPipeName(CancellationToken cancellationToken)
File "/
/src/libs/H.Pipes/PipeClient.cs", line 304, col 13, in async Task PipeClient.GetConnectionPipeName(CancellationToken cancellationToken)
File "/_/src/libs/H.Pipes/PipeClient.cs", line 176, col 13, in async Task PipeClient.ConnectAsync(CancellationToken cancellationToken)

We use wpf client to windows service communication (both .net 6). Exception occurs on client side.
Do you have any ideas why this may happen, and what is better solution to deal with it? I'm almost sure this is a some edge case when Windows or our service is shutting down, so I'm thinking simply wrap PipeClient.ConnectAsync() into try/catch and ignore this exception.

Thanks in advance!

@mogikanin mogikanin added the bug Something isn't working label Nov 8, 2024
@HavenDV
Copy link
Owner

HavenDV commented Nov 8, 2024

Yes, it seems your solution is the most optimal, I'm not sure that separate processing at the library level is required here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants