Fixed `connect` trigger when connection is only successful after a reconnect.