sing-box/transport/v2rayhttp/pool.go

14 lines
258 B
Go
Raw Normal View History

2023-03-30 11:06:57 +00:00
package v2rayhttp
import "net/http"
type ConnectionPool interface {
CloseIdleConnections()
}
func CloseIdleConnections(transport http.RoundTripper) {
if connectionPool, ok := transport.(ConnectionPool); ok {
connectionPool.CloseIdleConnections()
}
}