On Monday, April 17, 2017 at 10:30:43 PM UTC-7, Peter Mogensen wrote: > > However... If you call net/http.Server.Close() between the two calls you > get the expected result... which indicates you might be struggling with > the client side connection pool still having a keepalive HTTP connection > open to the old server where it can issue the second request. >
net/http.Server.Close() only exists in golang 1.8... I'm stuck in 1.7 right now so I can't use that. Your later comment about switching the handler doesn't apply to my case unfortunately, in the real code, I'm writing tests encapsulate the behavior of starting and stopping the server. I'll respond to Yuwei's post about the connection pooling, because I don't quite understand why that would make any difference. Thanks! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.