diff --git a/app/corpora/events.py b/app/corpora/events.py
index 907bcc939ae04976abc2fbfe0a85dc6f9a01ba6a..e0a880620eaf82739578b812ba4f1f3937a46745 100644
--- a/app/corpora/events.py
+++ b/app/corpora/events.py
@@ -245,6 +245,8 @@ def corpus_analysis_get_match_with_full_context(payload):
     i = 0
     # Send data one match at a time.
     for index, f_cpos, l_cpos in zip(data_indexes, first_cpos, last_cpos):
+        if client.status == 'abort':
+            break
         i += 1
         matches = []
         cpos_lookup = text_lookup = {}