net/http/httptest: remove workaround on Plan 9

This issue has been fixed in CL 31390.

Change-Id: I0c2425fd33be878037d10d612a50116a7b693431
Reviewed-on: https://go-review.googlesource.com/33195
Run-TryBot: David du Colombier <0intro@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
David du Colombier 2016-11-12 22:12:22 +01:00
parent 091ba60bd8
commit 4bee9012b3
1 changed files with 0 additions and 10 deletions

View File

@ -16,7 +16,6 @@ import (
"net/http"
"net/http/internal"
"os"
"runtime"
"sync"
"time"
)
@ -294,15 +293,6 @@ func (s *Server) closeConn(c net.Conn) { s.closeConnChan(c, nil) }
// closeConnChan is like closeConn, but takes an optional channel to receive a value
// when the goroutine closing c is done.
func (s *Server) closeConnChan(c net.Conn, done chan<- struct{}) {
if runtime.GOOS == "plan9" {
// Go's Plan 9 net package isn't great at unblocking reads when
// their underlying TCP connections are closed. Don't trust
// that that the ConnState state machine will get to
// StateClosed. Instead, just go there directly. Plan 9 may leak
// resources if the syscall doesn't end up returning. Oh well.
s.forgetConn(c)
}
c.Close()
if done != nil {
done <- struct{}{}