From a4eba1102b6842402f0768ddbcb9d1f28eedabe1 Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Mon, 12 Oct 2015 22:04:13 -0700 Subject: [PATCH] Switch bool chan to struct chan for less memory usage --- packer/rpc/communicator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packer/rpc/communicator.go b/packer/rpc/communicator.go index 48c6ea09f..34bb86da2 100644 --- a/packer/rpc/communicator.go +++ b/packer/rpc/communicator.go @@ -139,10 +139,10 @@ func (c *communicator) Download(path string, w io.Writer) (err error) { // Serve a single connection and a single copy streamId := c.mux.NextId() - waitServer := make(chan bool) + waitServer := make(chan struct{}) go func() { serveSingleCopy("downloadWriter", c.mux, streamId, w, nil) - waitServer <- true + close(waitServer) }() args := CommunicatorDownloadArgs{