packer/rpc: Close the net conn after done sending data for Comm
This commit is contained in:
parent
78ab1709cd
commit
7154b5c0f1
|
@ -222,6 +222,10 @@ func serveSingleCopy(name string, l net.Listener, dst io.Writer, src io.Reader)
|
||||||
return
|
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
|
// The connection is the destination/source that is nil
|
||||||
if dst == nil {
|
if dst == nil {
|
||||||
dst = conn
|
dst = conn
|
||||||
|
|
Loading…
Reference in New Issue