gomodule / redigo

Go client for Redis
Apache License 2.0
9.76k stars 1.25k forks source link

Potential goroutine leak in TestDialTLSHandshakeTimeout #641

Closed Jay-deng closed 1 year ago

Jay-deng commented 1 year ago

When I run some test on https://github.com/gomodule/redigo/blob/master/redis/conn_test.go, I get the following output information when running TestDialTLSHandshakeTimeout:

image

So I was wondering if there is a goroutine leak in that case?

stevenh commented 1 year ago

That test is designed to trigger a timeout. The close of the netConn in redis.DialContext should result in the TLS handshake returning an error but the test io.Reader never returns io.EOF so yes this is a leak but it's a leak in the test not the package.

Please try #643