-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: 4.0.0, 3.6.5
-
Component/s: None
In one shell, run: while true; do echo garbage | nc -l 27017; done
In another, connect with:
require('mongodb').MongoClient.connect('mongodb://localhost/', { useUnifiedTopology: true })
(for the 4.0 driver, leave out the option)
The resulting MongoParseError will always be uncaught, instead of rejecting the Promise returned by .connect() (which is what happens without using unified topology, and which is the expected behavior here).