gRPC Status(StatusCode=Unavailable, Detail="Socket closed")

58 views
Skip to first unread message

v.v.t...@gmail.com

unread,
Jul 23, 2019, 9:52:34 AM7/23/19
to grpc.io
Hello everyone,

I have the C# dotnet core client running on linux:

...
public async void TestGetX()
        {
            // Create a stub
            var server = new TestServer();

            // Connect to the stubbed server
            using (var referance = TestingFactory.Create(Testing.Config))
            {
                // Add two elements
                server.Element.AddX("Something");
                server.Element.AddX("Something Else");

                // Retrieve the elements via some api that the referance uses
                var elements = await refferance.GetX().ConfigureAwait(false);

                // Check that there are two elements
                Assert.Equal(2, elements.Count);
            }
            await server.StopServerAsync().ConfigureAwait(false);
        }
...


Half of the times I run this code it works fine, the other half it fails trying to get the elements at "var elements = await refferance.GetX().ConfigureAwait(false);" with the following error message:

Status(StatusCode=Unavailable, Detail="Socket closed")

If I retry to do the call it works always on the second try. Do you have any idea what would cause this issue?

Jan Tattermusch

unread,
Jul 23, 2019, 12:57:40 PM7/23/19
to v.v.t...@gmail.com, grpc.io

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/6f162e72-251c-4202-a5fe-bf0060b462eb%40googlegroups.com.


--

Jan

Reply all
Reply to author
Forward
0 new messages