Commit 4bee9012 authored by David du Colombier's avatar David du Colombier

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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 091ba60b
......@@ -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{}{}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment