Fix deadlock (#3904)

This commit is contained in:
Zoltan Papp
2025-05-30 23:38:02 +02:00
committed by GitHub
parent 2bef214cc0
commit aa07b3b87b

View File

@ -691,8 +691,7 @@ func (conn *Conn) evalStatus() ConnStatus {
}
func (conn *Conn) isConnectedOnAllWay() (connected bool) {
conn.mu.Lock()
defer conn.mu.Unlock()
// would be better to protect this with a mutex, but it could cause deadlock with Close function
defer func() {
if !connected {