Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: awaitable isMaster timeout must respect connectTimeoutMS #2650

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

emadum
Copy link
Contributor

@emadum emadum commented Dec 1, 2020

This PR ensures that awaitable isMaster handshakes respect an unlimited timeout (connectionTimeoutMS=0) as per the SDAM specification section on socket timeouts:

Clients MUST use connectTimeoutMS as the timeout for the connection handshake. When connectTimeoutMS=0, the timeout is unlimited and MUST remain unlimited for awaitable isMaster replies. Otherwise, connectTimeoutMS is non-zero and clients MUST use connectTimeoutMS + heartbeatFrequencyMS as the timeout for awaitable isMaster replies.

NODE-2874

(port of #2627 for 4.0)

@emadum emadum merged commit 8d44cc2 into master Dec 1, 2020
@emadum emadum deleted the NODE-2874/master/awaitable-ismaster-timeout branch December 1, 2020 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants