try {thread.join(timeout+1000);} catch(Exception e) {}
try {thread.join(hb_timeout+1000);} catch(Exception e) {}
	public synchronized void stop() {	    if(thread != null && thread.isAlive()) {		stop_hb=true;		missed_hb=false;		thread.interrupt();		try {thread.join(timeout+1000);} catch(Exception e) {}		thread=null;	    }	}