Skip to content

Commit db61cf2

Browse files
committed
Do not send nil relayClient to successChan
1 parent ed1a18a commit db61cf2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

relay/client/picker.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ func (sp *ServerPicker) processConnResults(resultChan chan connResult, successCh
112112
bestLatencyResult = cr
113113
}
114114

115-
successChan <- bestLatencyResult
115+
if bestLatencyResult.RelayClient != nil {
116+
successChan <- bestLatencyResult
117+
}
116118
close(successChan)
117119
}

0 commit comments

Comments
 (0)