Fix madmutt for stupid terms with only 64 colors.
[apps/madmutt.git] / pop.c
diff --git a/pop.c b/pop.c
index 2cc16e7..a066f6e 100644 (file)
--- a/pop.c
+++ b/pop.c
@@ -13,7 +13,7 @@
 #include <sasl/saslutil.h>
 
 #include <lib-sys/mutt_socket.h>
-#include <lib-ui/curses.h>
+#include <lib-ui/lib-ui.h>
 
 #include "crypt.h"
 #include "mutt.h"
@@ -416,6 +416,7 @@ static pop_query_status pop_authenticate (pop_data_t * pop_data)
                     attempts++;
                     break;
                 }
+                mutt_socket_close(pop_data->conn);
             }
         }
     } else {
@@ -431,6 +432,7 @@ static pop_query_status pop_authenticate (pop_data_t * pop_data)
                 attempts++;
                 break;
             }
+            mutt_socket_close(pop_data->conn);
         }
     }