Replaces ssh-tunnel implementation with @mongodb-js/ssh-tunnel and safely overrides driver close* to always wait for tunnel to close before resolving the callback. That way we can always be sure that tunnel is completely stopped before allowing for another connection to be open through a tunnel with the same port in e.g., Compass
* - I considered other options how to achieve that (for example, exposing tunnel with the client from the connect callback and then awaiting explicitly on it in data-service), but overriding close on client still feels like a better balance between how much stuff is exposed from the connection-model and "hackiness" of the implementation
Replaces
ssh-tunnel
implementation with@mongodb-js/ssh-tunnel
and safely overrides driverclose
* to always wait for tunnel to close before resolving the callback. That way we can always be sure that tunnel is completely stopped before allowing for another connection to be open through a tunnel with the same port in e.g., Compass* - I considered other options how to achieve that (for example, exposing
tunnel
with theclient
from theconnect
callback and then awaiting explicitly on it indata-service
), but overriding close on client still feels like a better balance between how much stuff is exposed from theconnection-model
and "hackiness" of the implementation