Fix #6306

Properly warn if the minion could not reach the master and prevent the
minion from stack tracing