"from RTSP conversation %d.",
conn->connection_number);
conn->stop = 1;
- pthread_kill(conn->thread, SIGUSR1);
+ pthread_cancel(conn->thread);
+ // pthread_kill(conn->thread, SIGUSR1);
}
}
int rco = get_requested_connection_state_to_output();
for (i = 0; i < nconns; i++) {
if (((except_this_thread == 0) || (pthread_equal(conns[i]->thread, except_this_thread) == 0)) &&
(conns[i]->running != 0)) {
- conns[i]->stop = 1;
- pthread_kill(conns[i]->thread, SIGUSR1);
+ pthread_cancel(conns[i]->thread);
+ pthread_join(conns[i]->thread,NULL);
+ debug(1,"Connection %d: asked to stop.",conns[i]->connection_number);
+ // conns[i]->stop = 1;
+ // pthread_kill(conns[i]->thread, SIGUSR1);
}
}
}