Chasing a leak that looks like an EBT clock. Deleted some unneeded code and adding a missing JS free.
This commit is contained in:
16
src/ssb.c
16
src/ssb.c
@ -287,7 +287,6 @@ typedef struct _tf_ssb_connection_t
|
||||
tf_ssb_blob_wants_t blob_wants;
|
||||
bool sent_clock;
|
||||
int32_t ebt_request_number;
|
||||
JSValue ebt_send_clock;
|
||||
|
||||
JSValue object;
|
||||
|
||||
@ -1862,8 +1861,6 @@ static void _tf_ssb_connection_destroy(tf_ssb_connection_t* connection, const ch
|
||||
|
||||
if (JS_IsUndefined(connection->object) && !connection->async.data && !connection->tcp.data && !connection->connect.data && connection->ref_count == 0)
|
||||
{
|
||||
JS_FreeValue(ssb->context, connection->ebt_send_clock);
|
||||
connection->ebt_send_clock = JS_UNDEFINED;
|
||||
tf_free(connection->message_requests);
|
||||
connection->message_requests = NULL;
|
||||
connection->message_requests_count = 0;
|
||||
@ -3594,19 +3591,6 @@ void tf_ssb_connection_set_ebt_request_number(tf_ssb_connection_t* connection, i
|
||||
connection->ebt_request_number = request_number;
|
||||
}
|
||||
|
||||
JSValue tf_ssb_connection_get_ebt_send_clock(tf_ssb_connection_t* connection)
|
||||
{
|
||||
JSContext* context = connection->ssb->context;
|
||||
return JS_DupValue(context, connection->ebt_send_clock);
|
||||
}
|
||||
|
||||
void tf_ssb_connection_set_ebt_send_clock(tf_ssb_connection_t* connection, JSValue send_clock)
|
||||
{
|
||||
JSContext* context = connection->ssb->context;
|
||||
JS_FreeValue(context, connection->ebt_send_clock);
|
||||
connection->ebt_send_clock = JS_DupValue(context, send_clock);
|
||||
}
|
||||
|
||||
JSValue tf_ssb_get_disconnection_debug(tf_ssb_t* ssb, JSContext* context)
|
||||
{
|
||||
JSValue result = JS_NewObject(context);
|
||||
|
Reference in New Issue
Block a user