[FIX] server: fixed reconnect logic bugs