Solve the quit problem, solve reconnect detector when detector restart
fix some bug for reconnection