Merge pull request #104 from kzys/windows-wsarecv

Log the error's underyling errno if there is
This commit is contained in:
Derek McGowan 2022-02-21 14:00:17 -08:00 committed by GitHub
commit 40a76139bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,7 @@ import (
"runtime"
"strings"
"sync"
"syscall"
"testing"
"time"
@ -370,6 +371,13 @@ func TestClientEOF(t *testing.T) {
if err := client.Call(ctx, serviceName, "Test", tp, tp); err == nil {
t.Fatalf("expected error when calling against shutdown server")
} else if !errors.Is(err, ErrClosed) {
errno, ok := err.(syscall.Errno)
if ok {
t.Logf("errno=%d", errno)
} else {
t.Logf("error %q doesn't match syscall.Errno", err)
}
t.Fatalf("expected to have a cause of ErrClosed, got %v", err)
}
}