mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-15 01:32:56 +02:00
Fix deadlock (#3904)
This commit is contained in:
@ -691,8 +691,7 @@ func (conn *Conn) evalStatus() ConnStatus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (conn *Conn) isConnectedOnAllWay() (connected bool) {
|
func (conn *Conn) isConnectedOnAllWay() (connected bool) {
|
||||||
conn.mu.Lock()
|
// would be better to protect this with a mutex, but it could cause deadlock with Close function
|
||||||
defer conn.mu.Unlock()
|
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
if !connected {
|
if !connected {
|
||||||
|
Reference in New Issue
Block a user