Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
htsp server: fix the bytes out updates
  • Loading branch information
perexg committed Jan 5, 2016
1 parent 7243471 commit bdda940
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/htsp_server.c
Expand Up @@ -2291,8 +2291,10 @@ htsp_method_getTicket(htsp_connection_t *htsp, htsmsg_t *in)
static void _bytes_out_cb(void *aux)
{
htsp_subscription_t *hs = aux;
if (hs->hs_s)
if (hs->hs_s) {
subscription_add_bytes_out(hs->hs_s, atomic_exchange(&hs->hs_s_bytes_out, 0));
gtimer_arm_ms(&hs->hs_s_bytes_out_timer, _bytes_out_cb, hs, 200);
}
}

/**
Expand Down

0 comments on commit bdda940

Please sign in to comment.