Skip to content

Commit

Permalink
advancedtls: check error before deferring close (#3659)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhenLian authored Jun 5, 2020
1 parent ad51f57 commit 479df5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/advancedtls/advancedtls_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,10 @@ func TestEnd2End(t *testing.T) {
s := grpc.NewServer(grpc.Creds(serverTLSCreds))
defer s.Stop()
lis, err := net.Listen("tcp", port)
defer lis.Close()
if err != nil {
t.Fatalf("failed to listen: %v", err)
}
defer lis.Close()
pb.RegisterGreeterServer(s, &serverImpl{})
go s.Serve(lis)
clientOptions := &ClientOptions{
Expand Down

0 comments on commit 479df5e

Please sign in to comment.