Commit 7154b5c0 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer/rpc: Close the net conn after done sending data for Comm

parent 78ab1709
......@@ -222,6 +222,10 @@ func serveSingleCopy(name string, l net.Listener, dst io.Writer, src io.Reader)
return
}
// Be sure to close the connection after we're done copying so
// that an EOF will successfully be sent to the remote side
defer conn.Close()
// The connection is the destination/source that is nil
if dst == nil {
dst = conn
......
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