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

This commit is contained in:
Mitchell Hashimoto 2013-12-21 08:07:42 -08:00
parent 3e08ccba00
commit f4567ee921
1 changed files with 3 additions and 3 deletions

View File

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