2007-10-22 Lorenzo Colitti <lorenzo@colitti.com>
* smux.c: (smux_stop) Avoid cancelling a defunct thread pointer
(smux_start) Stop smux before trying to start it, possibly again.
+2007-10-22 Lorenzo Colitti <lorenzo@colitti.com>
+
+ * smux.c: (smux_stop) Avoid cancelling a defunct thread pointer
+ (smux_start) Stop smux before trying to start it, possibly again.
+
2007-10-04 Denis Ovsienko
* pid_output.c: (pid_output) stop using LOGFILE_MASK
smux_stop ()
{
if (smux_read_thread)
- thread_cancel (smux_read_thread);
+ {
+ thread_cancel (smux_read_thread);
+ smux_read_thread = NULL;
+ }
+
if (smux_connect_thread)
- thread_cancel (smux_connect_thread);
+ {
+ thread_cancel (smux_connect_thread);
+ smux_connect_thread = NULL;
+ }
if (smux_sock >= 0)
{
void
smux_start(void)
{
+ /* Close any existing connections. */
+ smux_stop();
+
/* Schedule first connection. */
smux_event (SMUX_SCHEDULE, 0);
}