File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -243,16 +243,15 @@ func (cn *Conn) CompareAndSwapUsable(old, new bool) bool {
243243 StateIdle ,
244244 )
245245 return err == nil
246- } else {
247- // Trying to make unusable - transition from IDLE to UNUSABLE
248- // This is typically for acquiring the connection for background operations
249- // Use predefined slice to avoid allocation
250- _ , err := cn .stateMachine .TryTransition (
251- validFromIdle ,
252- StateUnusable ,
253- )
254- return err == nil
255246 }
247+ // Trying to make unusable - transition from IDLE to UNUSABLE
248+ // This is typically for acquiring the connection for background operations
249+ // Use predefined slice to avoid allocation
250+ _ , err := cn .stateMachine .TryTransition (
251+ validFromIdle ,
252+ StateUnusable ,
253+ )
254+ return err == nil
256255}
257256
258257// IsUsable returns true if the connection is safe to use for new commands (lock-free).
You can’t perform that action at this time.
0 commit comments