Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Only call CloseWrite if it is implemented
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
  • Loading branch information
titanous committed Jul 26, 2014
1 parent 191a512 commit 548f4df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion http.go
Expand Up @@ -522,7 +522,9 @@ func (s *httpService) handle(req *http.Request, sc *httputil.ServerConn, tls, st
done := make(chan struct{})
go func() {
serverR.WriteTo(clientW)
clientW.(writeCloser).CloseWrite()
if cw, ok := clientW.(writeCloser); ok {
cw.CloseWrite()
}
close(done)
}()
clientR.WriteTo(serverW)
Expand Down

0 comments on commit 548f4df

Please sign in to comment.