Skip to content

Instantly share code, notes, and snippets.

@gahr
Created July 19, 2021 14:34
Show Gist options
  • Select an option

  • Save gahr/88c1380a40f676d084a329feba3cf1ab to your computer and use it in GitHub Desktop.

Select an option

Save gahr/88c1380a40f676d084a329feba3cf1ab to your computer and use it in GitHub Desktop.
diff --git a/conn/socket.c b/conn/socket.c
index 0311e61ee..da4a7a615 100644
--- a/conn/socket.c
+++ b/conn/socket.c
@@ -36,6 +36,7 @@
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
+#include "mutt_globals.h"
#include "socket.h"
#include "connaccount.h"
#include "connection.h"
@@ -124,7 +125,11 @@ int mutt_socket_close(struct Connection *conn)
*/
int mutt_socket_read(struct Connection *conn, char *buf, size_t len)
{
- return conn->read(conn, buf, len);
+ mutt_sig_allow_interrupt(true);
+ int rc = conn->read(conn, buf, len);
+ SigInt = false;
+ mutt_sig_allow_interrupt(false);
+ return rc;
}
/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment