1. 07 Dec, 2016 3 commits
    • Brad Fitzpatrick's avatar
      ipv4: deflake TestConnUnicastSocketOptions on Windows · 944c58e9
      Brad Fitzpatrick authored
      TestConnUnicastSocketOptions doesn't work on nacl, plan9, or windows,
      but the t.Skip at the top was missing the GOOS == "windows" check. (It
      was present in the ipv6 version of the test)
      
      The test than proceeded to try to run and set up a connection pair
      for testing. Here's what was happening.
      
      Goroutines are M (main, the client) and S (server, doing the Accept):
      
         M: net.Listen("tcp4", "127.0.0.1:0"), succeeds.
         M: defer ln.Close() enqueued.
         M: go acceptor() (start "S" (server) goroutine)
         M: net.Dial("tcp4", ln.Addr().String()), succeeds.
            Notably, it's connected to the kernel's TCP stack at this point.
            The userspace Accept hasn't run. Go's listen backlog is
            syscall.SOMAXCONN on Windows (which is fine).
         M: testUnicastSocketOptions:
            - finds that it's GOOS == "windows",
            - calls t.Skipf, which calls runtime.Goexit, runs deferred goroutines
         M: ln.Close() (previously deferred runs)
         M: test completes
      
      Then:
      
         S: server goroutine finally schedules
         S: c, err := ln.Accept(), gets an error (because it's closed)
            if err != nil {
                 t.Error(err)   // setting an error after test is done; bogus
      
      So, fix it both ways: skip the test earlier on "windows", and simplify
      the server goroutine and move the failing into the main goroutine.
      Also skip other tests earlier on Windows that will also t.Skip. They
      don't have goroutines, but might as well skip earlier.
      
      Fixes golang/go#17655
      
      Change-Id: I5d910d70943be37b2b4b56542ee98e42fc3acd71
      Reviewed-on: https://go-review.googlesource.com/34021
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarBryan Mills <bcmills@google.com>
      944c58e9
    • Mikio Hara's avatar
      ipv4: add missing IP_HDRINCL option on Windows · de22433a
      Mikio Hara authored
      Change-Id: Ibb7dacadef404f6fc4e6c744a5015835e580c97e
      Reviewed-on: https://go-review.googlesource.com/34094
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      de22433a
    • Mikio Hara's avatar
      nettest: update comment on MakePipe · 97730608
      Mikio Hara authored
      To warn about the provided stop function should not be nil.
      
      Change-Id: I73351b6379ae22e85298ce9e87ee80077f748c7e
      Reviewed-on: https://go-review.googlesource.com/34091
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
      97730608
  2. 06 Dec, 2016 5 commits
  3. 02 Dec, 2016 2 commits
  4. 16 Nov, 2016 5 commits
  5. 15 Nov, 2016 4 commits
  6. 14 Nov, 2016 4 commits
  7. 10 Nov, 2016 1 commit
  8. 09 Nov, 2016 1 commit
  9. 08 Nov, 2016 3 commits
  10. 07 Nov, 2016 1 commit
  11. 04 Nov, 2016 2 commits
  12. 03 Nov, 2016 1 commit
    • Brad Fitzpatrick's avatar
      http2: fix over-aggressive ignoring of frames while in "go away" mode · 569280fa
      Brad Fitzpatrick authored
      https://golang.org/cl/31727 made many of the Server Frame processors
      ignore incoming frames if the connection was in shutdown mode.
      
      The idea was that it's pointless to do work if we're about to hang up
      on them in 250ms anyway for violating a protocol error.
      
      But as of https://golang.org/cl/32412 (graceful shutdown) we can also
      be in "go away" mode for ErrCodeNo, which just means to nicely tell
      them to GOAWAY and because they did nothing wrong, we don't hang up in
      250ms (the value of which gave the peer time to read the error before
      the TCP close), but instead we keep the conn open until it's idle.
      
      The combination of the two CLs made TestTransportAndServerSharedBodyRace_h2
      flaky, since it was never seeing RST_STREAM on cancelation of requests,
      and then Handlers would block forever.
      
      Updates golang/go#17733 (fixes after bundle into std)
      
      Change-Id: I67491c1d7124bc3cb554f9246ea7683f20b6a4e3
      Reviewed-on: https://go-review.googlesource.com/32583
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      569280fa
  13. 02 Nov, 2016 2 commits
  14. 01 Nov, 2016 1 commit
    • Daniel Theophanes's avatar
      webdav: add Context argument to FileSystem interface · 4bb47a10
      Daniel Theophanes authored
      Currently there is no way to pass request scoped information from
      the handler to the FileSytem interface. This can be important
      to pass credentials or timeout parameters to the FileSystem
      operations. Pipe context through the request from
      http.Request.Context(). With pre-go1.7 use context.Background().
      
      Custom FileSystem implementations will need to change, but it will
      only require a new argument in each of the FileSystem methods.
      The change will be trivial to update to.
      
      Fixes golang/go#17658
      
      Change-Id: I7491faf3467ad55db793a68081e074a9b3f9624d
      Reviewed-on: https://go-review.googlesource.com/32421Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      4bb47a10
  15. 31 Oct, 2016 2 commits
  16. 30 Oct, 2016 2 commits
  17. 29 Oct, 2016 1 commit