auto-reconn: fix bug that state_mutex is not initialized