sing-box/transport/v2rayhttp/pool.go
2023-03-31 14:31:35 +08:00

14 lines
258 B
Go

package v2rayhttp
import "net/http"
type ConnectionPool interface {
CloseIdleConnections()
}
func CloseIdleConnections(transport http.RoundTripper) {
if connectionPool, ok := transport.(ConnectionPool); ok {
connectionPool.CloseIdleConnections()
}
}