Skip to content

Commit

Permalink
Improve check
Browse files Browse the repository at this point in the history
  • Loading branch information
neilalexander committed Aug 13, 2023
1 parent fd482d6 commit 9a54348
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/admin/getpeers.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type PeerEntry struct {
PublicKey string `json:"key"`
Port uint64 `json:"port"`
Priority uint64 `json:"priority"`
Multipath bool `json:"multipath"`
Multipath bool `json:"multipath,omitempty"`
RXBytes DataUnit `json:"bytes_recvd,omitempty"`
TXBytes DataUnit `json:"bytes_sent,omitempty"`
Uptime float64 `json:"uptime,omitempty"`
Expand Down
7 changes: 5 additions & 2 deletions src/core/link_tcp_mptcp_go121.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ func isMPTCP(c net.Conn) bool {
mp, _ := tc.MultipathTCP()
return mp
case *tls.Conn:
mp, _ := tc.NetConn().(*net.TCPConn).MultipathTCP()
return mp
if tc, ok := tc.NetConn().(*net.TCPConn); ok {
mp, _ := tc.MultipathTCP()
return mp
}
return false
default:
return false
}
Expand Down

0 comments on commit 9a54348

Please sign in to comment.