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

pull/15/head
Mitchell Hashimoto 13 years ago
parent 78ab1709cd
commit 7154b5c0f1

@ -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

Loading…
Cancel
Save