예제 #1
0
func (f *httpConnectHandler) dial(network, addr string) (net.Conn, error) {
	conn, dialErr := f.Dialer(network, addr)
	if dialErr != nil {
		return nil, errors.New("Unable to dial %v: %v", addr, dialErr)
	}
	conn = idletiming.Conn(conn, f.IdleTimeout, nil)
	return conn, nil
}
예제 #2
0
// Fail fails execution of the current chain
func Fail(msg string, args ...interface{}) error {
	return errors.New(msg, args...)
}