golang1.4 http服务器保持空闲连接

Is there a way to keep idle connection open after a specified timeout at the server side?

I have a http server implemented using golang1.4 and an API will respond after 10 seconds. While I set MaxIdleConnsPerHost at the client (using golang1.4), I still get the read tcp xx.xx.xx.xx:xx: use of closed network connection. I think it may be caused by server closing the idle connection.

I found GOLANG, HTTP having “use of closed network connection” error and http.Server: timeout for idle connections only?, but they didn't help.

At the server side, set ReadTimeout may help.

Ref: Creating an idle timeout in Go?