Skip to content
Snippets Groups Projects
Select Git revision
  • e01e05ef502bf8330b8630e7723ca73b80c997f1
  • noblogs default
  • noblogs-5.7.1
  • upstream
  • noblogs-5.7
  • noblogs-5.6new
  • upstream5.5.1
  • noblogs28dic
  • upstream28dic
  • noblogs-5.5.1
  • noblogs-5.4.2
  • noblogs-5.4_seconda
  • noblogs-5.4
  • noblogs-7c
  • wp5.2.3p3
  • mergedbconf
  • noblogs-5.7.1
  • noblogs.5.7.0p1
  • noblogs-5.7.0
  • noblogs-5.6p3
  • noblogs5.6p2
  • noblogs-5.6p1
  • noblogs-5.6
  • noblogs-5.4.2p1
  • noblogs-5.4.2
  • noblogs-5.4.1
  • noblogs-5.4
  • noblogs-p5.4
  • noblogs-5.3.2p2
  • noblogs-5.3.2p1
  • noblogs-5.3.2
  • noblogs-5.3
  • noblogs-5.2.3p4
  • noblogs-5.2.3p3
  • noblogs-5.2.3p2
  • noblogs-5.2.3p1
36 results

class-wp-rest-server.php

Blame
  • dialer_legacy.go 581 B
    // +build !go1.9
    
    package clientutil
    
    import (
    	"context"
    	"net"
    	"time"
    )
    
    // Go < 1.9 does not have net.DialContext, reimplement it in terms of
    // net.DialTimeout.
    func netDialContext(addr string, connectTimeout time.Duration) func(context.Context, string, string) (net.Conn, error) {
    	return func(ctx context.Context, net string, _ string) (net.Conn, error) {
    		if deadline, ok := ctx.Deadline(); ok {
    			ctxTimeout := time.Until(deadline)
    			if ctxTimeout < connectTimeout {
    				connectTimeout = ctxTimeout
    			}
    		}
    		return net.DialTimeout(network, addr, connectTimeout)
    	}
    }