static void lis_close(struct tls_listener *listener)
{
    if (listener->is_registered) {
	pjsip_tpmgr_unregister_tpfactory(listener->tpmgr, &listener->factory);
	listener->is_registered = PJ_FALSE;
    }

    if (listener->ssock) {
	pj_ssl_sock_close(listener->ssock);
	listener->ssock = NULL;
    }
}
static void lis_close(struct tls_listener *listener)
{
    if (listener->is_registered) {
	pjsip_tpmgr_unregister_tpfactory(listener->tpmgr, &listener->factory);
	listener->is_registered = PJ_FALSE;
    }

    if (listener->ssock) {
	pj_ssl_sock_close(listener->ssock);
	listener->ssock = NULL;
    }
}