File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -812,7 +812,7 @@ func (c *Conn) watchConnChange() {
812
812
}
813
813
peer := status .Peer [peers [0 ]]
814
814
// If the connection type has changed, send a telemetry event with the latest ping stats
815
- if c .telemetryStore .changedConntype (peer .Relay ) {
815
+ if c .telemetryStore .changedConntype (peer .CurAddr ) {
816
816
c .telemetryStore .pingPeer (c )
817
817
}
818
818
}
Original file line number Diff line number Diff line change @@ -102,17 +102,17 @@ func (b *TelemetryStore) pingPeer(conn *Conn) {
102
102
}()
103
103
}
104
104
105
- func (b * TelemetryStore ) changedConntype (relay string ) bool {
105
+ func (b * TelemetryStore ) changedConntype (addr string ) bool {
106
106
b .mu .Lock ()
107
107
defer b .mu .Unlock ()
108
108
109
- if b .p2p && relay = = "" {
109
+ if b .p2p && addr ! = "" {
110
110
return false
111
- } else if ! b .p2p && relay = = "" {
111
+ } else if ! b .p2p && addr ! = "" {
112
112
b .p2p = true
113
113
b .p2pSetupTime = time .Since (b .lastDerpTime )
114
114
return true
115
- } else if b .p2p && relay ! = "" {
115
+ } else if b .p2p && addr = = "" {
116
116
b .p2p = false
117
117
b .lastDerpTime = time .Now ()
118
118
b .p2pSetupTime = 0
You can’t perform that action at this time.
0 commit comments