fixed a reconnection bug with multiple promise resolving