mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-10 11:03:13 +00:00
14 lines
258 B
Go
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()
|
||
|
}
|
||
|
}
|