Skip to content

Commit

Permalink
optimize: don't ping if is http outbound proto
Browse files Browse the repository at this point in the history
  • Loading branch information
nange committed Apr 24, 2024
1 parent 9027eb5 commit 42f51af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions easyss.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,11 @@ func (ss *Easyss) AvailableConn(needPingACK ...bool) (conn net.Conn, err error)
log.Warn("[EASYSS] get conn failed", "err", err)
continue
}
if ss.IsHTTPOutboundProto() || ss.IsHTTPSOutboundProto() {
if len(needPingACK) == 0 || !needPingACK[0] {
break
}
}

err = pingTest(conn)
if err != nil {
Expand Down

0 comments on commit 42f51af

Please sign in to comment.