static void async_ipc_estream_closed(void *context) { async_ipc_t *aipc = context; event_timer_del(async_ipc_estream_timed_out, aipc); aipc->e = NULL; if (aipc->cb) { rg_error(LERR, "Async IPC: Peer closed connection"); async_ipc_notify(aipc, -1); } }
void conn_close(conn_t *c) { if (!c) { return; } if (c->fd > 0) { close(c->fd); c->fd = FAST_INVALID_FILE; //remove timers if (c->read->timer_set && c->ev_timer) { event_timer_del(c->ev_timer, c->read); } if (c->write->timer_set && c->ev_timer) { event_timer_del(c->ev_timer, c->write); } if (c->ev_base) { event_del_conn(c->ev_base, c, EVENT_CLOSE_EVENT); } } }
static void interval_cb(event_t *e, u32 resource_id, u64 timestamp) { obj_t *o, *this, *func; func = js_event_get_func(e); this = js_event_get_this(e); if (function_call(&o, this, 1, &func)) { int tid = 0; obj_get_property_int(&tid, js_event_obj(e), &Stimer_id); event_timer_del(tid); } obj_put(this); obj_put(func); obj_put(o); }