mongodb-js / data-service

The MongoDB Data Service
Apache License 2.0
7 stars 4 forks source link

fix: Use latest connection-model and keep reference to tunnel to be able to close it when disconnecting native client COMPASS-4474 #308

Closed gribnoysup closed 3 years ago

gribnoysup commented 3 years ago

Follow-up to https://github.com/mongodb-js/connection-model/pull/352 that makes sure that when connection-model returns a tunnel during connect, we close it before resolving a disconnect callback

gribnoysup commented 3 years ago

@alenakhineika good point, not sure we can write one without mocking a whole bunch of stuff, but will add something! Thanks for nudging me to write more tests, I am getting a bit lazy with it sometimes 😊

gribnoysup commented 3 years ago

@alenakhineika added a test case in 5bb7cbc