github.com/sagernet/sing-box@v1.9.0-rc.20/transport/v2rayhttp/pool.go (about)

     1  package v2rayhttp
     2  
     3  import "net/http"
     4  
     5  type ConnectionPool interface {
     6  	CloseIdleConnections()
     7  }
     8  
     9  func CloseIdleConnections(transport http.RoundTripper) {
    10  	if connectionPool, ok := transport.(ConnectionPool); ok {
    11  		connectionPool.CloseIdleConnections()
    12  	}
    13  }