mirror of
https://github.com/redis/go-redis.git
synced 2025-04-17 20:17:02 +03:00
This makes the reading and writing of lastDialError from the pool faster, as atomic.Value is much more lightweight than the mutex. Note that using error in atomic.Value directly could cause panics, because errors could have inconsistent types. Thus wrap them with a simple struct.