* Correctly handle SSH failing to establish a connection. Because
this didn't work right, the build hook wouldn't fall back to using other machines of the desired type.
This commit is contained in:
		
							parent
							
								
									034f608e00
								
							
						
					
					
						commit
						1e5f5ea2e9
					
				
					 1 changed files with 7 additions and 4 deletions
				
			
		|  | @ -25,13 +25,16 @@ sub openSSHConnection { | ||||||
|     # print "started" when it has established the connection, and wait |     # print "started" when it has established the connection, and wait | ||||||
|     # until we see that. |     # until we see that. | ||||||
|     open SSH, "ssh $sshHost @sshOpts -M -N -o LocalCommand='echo started' -o PermitLocalCommand=yes |" or die; |     open SSH, "ssh $sshHost @sshOpts -M -N -o LocalCommand='echo started' -o PermitLocalCommand=yes |" or die; | ||||||
|  | 
 | ||||||
|     while (<SSH>) { |     while (<SSH>) { | ||||||
|         chomp; |         chomp; | ||||||
|         last if /started/; |         if ($_ eq "started") { | ||||||
|  |             $sshStarted = 1; | ||||||
|  |             return 1; | ||||||
|  |         } | ||||||
|     } |     } | ||||||
|      | 
 | ||||||
|     $sshStarted = 1; |     return 0; | ||||||
|     return 1; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| # Tell the master SSH client to exit. | # Tell the master SSH client to exit. | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue