aboutsummaryrefslogtreecommitdiff
path: root/ssh
diff options
context:
space:
mode:
Diffstat (limited to 'ssh')
-rw-r--r--ssh/tomsg_clientlib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ssh/tomsg_clientlib.c b/ssh/tomsg_clientlib.c
index adcb4ee..e6d3684 100644
--- a/ssh/tomsg_clientlib.c
+++ b/ssh/tomsg_clientlib.c
@@ -815,6 +815,11 @@ static enum tomsg_retval handle_line(
inflight.event.history.messages = calloc(count, sizeof(struct history_message));
if (!inflight.event.history.messages) CLEANUP_RETURN(TOMSG_ERR_MEMORY);
+ // If there are no history_message's coming, complete early
+ if (count == 0) {
+ SUCCESS_RETURN();
+ }
+
// Re-add the tag for the history_message events
enum tomsg_retval ret = add_inflight(client, tag, inflight.event);
if (ret != TOMSG_OK) return ret;