forked from redis/ioredis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle connection after connect event was emitted
It's possible for connect promise to resolve after the resolved connection has already been established, which means we miss the connect event. This can happen when Bluebird is set as the global Promise, and we connect to an ip address host for example. This fix checks to see if that's the case and invokes the connection handler directly. Thanks @luin for the recommendation. Fixes redis#977
- Loading branch information
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters