logfile=$SSH_LOGDIR/${login+"$login@"}"$host"${port+":$port"}.log
if ! "$REAL_SSH" -Ocheck \
${port+-p$port} ${login+"$login@"}"$host" \
- >/dev/null 2>&1; then
+ >/dev/null 2>&1
+ then
"$REAL_SSH" -MNf "${masteropts[@]}" "$host" \
</dev/null >/dev/null 2>$logfile
fi