Commit f4567ee9 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer/rpc: communicator shouldn't conncet to ID 0

parent 3e08ccba
...@@ -164,7 +164,7 @@ func (c *CommunicatorServer) Start(args *CommunicatorStartArgs, reply *interface ...@@ -164,7 +164,7 @@ func (c *CommunicatorServer) Start(args *CommunicatorStartArgs, reply *interface
} }
}() }()
if args.StdinStreamId >= 0 { if args.StdinStreamId > 0 {
conn, err := c.mux.Dial(args.StdinStreamId) conn, err := c.mux.Dial(args.StdinStreamId)
if err != nil { if err != nil {
close(doneCh) close(doneCh)
...@@ -175,7 +175,7 @@ func (c *CommunicatorServer) Start(args *CommunicatorStartArgs, reply *interface ...@@ -175,7 +175,7 @@ func (c *CommunicatorServer) Start(args *CommunicatorStartArgs, reply *interface
cmd.Stdin = conn cmd.Stdin = conn
} }
if args.StdoutStreamId >= 0 { if args.StdoutStreamId > 0 {
conn, err := c.mux.Dial(args.StdoutStreamId) conn, err := c.mux.Dial(args.StdoutStreamId)
if err != nil { if err != nil {
close(doneCh) close(doneCh)
...@@ -186,7 +186,7 @@ func (c *CommunicatorServer) Start(args *CommunicatorStartArgs, reply *interface ...@@ -186,7 +186,7 @@ func (c *CommunicatorServer) Start(args *CommunicatorStartArgs, reply *interface
cmd.Stdout = conn cmd.Stdout = conn
} }
if args.StderrStreamId >= 0 { if args.StderrStreamId > 0 {
conn, err := c.mux.Dial(args.StderrStreamId) conn, err := c.mux.Dial(args.StderrStreamId)
if err != nil { if err != nil {
close(doneCh) close(doneCh)
......
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