Provide better reconnection error message

This commit is contained in:
Nicolas Viennot
2016-03-28 23:29:49 -04:00
parent 46a29037d4
commit c9813a8c42
3 changed files with 10 additions and 5 deletions

View File

@ -157,7 +157,7 @@ static void on_reconnect_retry(__unused evutil_socket_t fd, __unused short what,
}
}
void tmate_reconnect_session(struct tmate_session *session)
void tmate_reconnect_session(struct tmate_session *session, const char *message)
{
/*
* We no longer have an SSH connection. Time to reconnect.
@ -171,7 +171,10 @@ void tmate_reconnect_session(struct tmate_session *session)
on_reconnect_retry, session);
evtimer_add(&session->ev_connection_retry, &tv);
tmate_status_message("Reconnecting...");
if (message)
tmate_status_message("Reconnecting... (%s)", message);
else
tmate_status_message("Reconnecting...");
/*
* This says that we'll need to send a snapshot of the current state.