Shutdown now correctly handles connection

This commit is contained in:
James Booth
2012-09-23 19:26:07 +01:00
parent d136298f96
commit 6d329343dc
9 changed files with 7 additions and 13 deletions

View File

@@ -68,7 +68,6 @@ profanity_run(void)
inp[size++] = '\0';
cmd_result = _process_input(inp);
}
}
void
@@ -91,11 +90,10 @@ profanity_init(const int disable_tls, char *log_level)
void
profanity_shutdown_init(void)
{
log_info("Profanity is shutting down.");
gboolean wait_response = jabber_disconnect();
if (wait_response) {
while (TRUE) {
while (jabber_connection_status() == JABBER_DISCONNECTING) {
jabber_process_events();
}
}
@@ -109,7 +107,6 @@ profanity_shutdown(void)
gui_close();
chat_log_close();
prefs_close();
log_info("Shutdown complete");
log_close();
}