Esempio n. 1
0
static void
DNSResolver_tp_dealloc(DNSResolver *self)
{
    if (self->channel) {
        uv_ares_destroy(UV_LOOP(self), self->channel);
        self->channel = NULL;
    }
    DNSResolver_tp_clear(self);
    Py_TYPE(self)->tp_free((PyObject *)self);
}
Esempio n. 2
0
File: core.c Progetto: Maxence/node
void uv_loop_delete(uv_loop_t* loop) {
  uv_ares_destroy(loop, loop->channel);
  ev_loop_destroy(loop->ev);
  uv__loop_platform_delete(loop);
#ifndef NDEBUG
  memset(loop, -1, sizeof *loop);
#endif
  if (loop == default_loop_ptr)
    default_loop_ptr = NULL;
  else
    free(loop);
}
Esempio n. 3
0
void
cert_updater_stop(ProxyContext * const proxy_context)
{
    CertUpdater * const cert_updater = &proxy_context->cert_updater;

    if (cert_updater->has_cert_timer) {
        cert_updater->has_cert_timer = 0;
        uv_timer_stop(&cert_updater->cert_timer);
    }
    uv_ares_destroy(proxy_context->event_loop, cert_updater->ar_channel);
    ares_destroy_options(&cert_updater->ar_options);
}
Esempio n. 4
0
void uv__loop_delete(uv_loop_t* loop) {
  uv_ares_destroy(loop, loop->channel);
  ev_loop_destroy(loop->ev);
#if __linux__
  if (loop->inotify_fd == -1) return;
  ev_io_stop(loop->ev, &loop->inotify_read_watcher);
  close(loop->inotify_fd);
  loop->inotify_fd = -1;
#endif
#if HAVE_PORTS_FS
  if (loop->fs_fd != -1)
    close(loop->fs_fd);
#endif
}
Esempio n. 5
0
void uv_loop_delete(uv_loop_t* loop) {
  uv_ares_destroy(loop, loop->channel);
  ev_loop_destroy(loop->ev);
  free(loop);
}