Skip to content

Commit

Permalink
test: make server variable names consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael committed Sep 5, 2024
1 parent 93b744c commit f1a66c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func testConnTLS(t testing.TB) (io.ReadWriteCloser, io.ReadWriteCloser) {
}
t.Cleanup(func() { _ = l.Close() })

var srv net.Conn
var server net.Conn
errCh := make(chan error, 1)
go func() {
defer close(errCh)
Expand All @@ -135,7 +135,7 @@ func testConnTLS(t testing.TB) (io.ReadWriteCloser, io.ReadWriteCloser) {
return
}

srv = tls.Server(conn, &tls.Config{
server = tls.Server(conn, &tls.Config{
Certificates: []tls.Certificate{cert},
})
}()
Expand All @@ -155,9 +155,9 @@ func testConnTLS(t testing.TB) (io.ReadWriteCloser, io.ReadWriteCloser) {
if err := <-errCh; err != nil {
t.Fatalf("error creating tls server: %v", err)
}
t.Cleanup(func() { _ = srv.Close() })
t.Cleanup(func() { _ = server.Close() })

return tlsClient, srv
return tlsClient, server
}

// connTypeFunc is func that returns a client and server connection for testing
Expand Down

0 comments on commit f1a66c0

Please sign in to comment.