[geary/wip/conversation-polish: 7/26] Ensure Imap.ClientConnection also notifies of status responses on error



commit 8bb07c550f7c6ededc324636644dcfdc86ad7ec4
Author: Michael Gratton <mike vee net>
Date:   Thu Jan 24 18:54:48 2019 +1100

    Ensure Imap.ClientConnection also notifies of status responses on error

 src/engine/imap/transport/imap-client-connection.vala | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/imap/transport/imap-client-connection.vala 
b/src/engine/imap/transport/imap-client-connection.vala
index b333bd60..b7d9843a 100644
--- a/src/engine/imap/transport/imap-client-connection.vala
+++ b/src/engine/imap/transport/imap-client-connection.vala
@@ -539,6 +539,9 @@ public class Geary.Imap.ClientConnection : BaseObject {
 
     private void on_status_response(StatusResponse status)
         throws ImapError {
+        // Emit this first since the code blow may throw errors
+        received_status_response(status);
+
         if (status.is_completion) {
             Command? sent = get_sent_command(status.tag);
             if (sent == null) {
@@ -551,8 +554,6 @@ public class Geary.Imap.ClientConnection : BaseObject {
             // This could throw an error so call it after cleaning up
             sent.completed(status);
         }
-
-        received_status_response(status);
     }
 
     private void on_server_data(ServerData data)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]