diff --git a/src/ssb.rpc.c b/src/ssb.rpc.c index 5f5d8875..1140c5f8 100644 --- a/src/ssb.rpc.c +++ b/src/ssb.rpc.c @@ -1055,7 +1055,7 @@ static void _tf_ssb_rpc_ebt_send_clock_callback(const tf_ssb_ebt_clock_t* clock, resend_clock_t* resend = user_data; tf_ssb_connection_t* connection = resend->connection; - if (clock && clock->count) + if (clock && clock->count && tf_ssb_connection_is_connected(connection) && !tf_ssb_connection_is_closing(connection)) { JSContext* context = tf_ssb_connection_get_context(connection); JSValue message = JS_NewObject(context);