Closed C-NERD closed 2 years ago
Is the mongod server running with option --sslMode requireSSL
?
Or you can define when initialized Mongo like this let mongo = newMongo[AsyncSocket](host = host, port = port, ssl = false)
or let mongo = newMongo[AsyncSocket](MongoUri fmt"mongodb://{host}:{port}/")
Or you can define when initialized Mongo like this
let mongo = newMongo[AsyncSocket](host = host, port = port, ssl = false)
orlet mongo = newMongo[AsyncSocket](MongoUri fmt"mongodb://{host}:{port}/")
This works. Thanks 👍 Also if you don't mind what caused the problem in the first place.
The simple newMongo
had issue with when defined(ssl)
before, see issue #13 .
Since this is solved, I'm going to close this one. If there's another problem, feel free to open new issue. Thanks
Here is the part of the code that's causing the error
To be specific it's
mongo.connect()
. It returnswhen i compile with the -d:ssl compiler flag, I need the compiler flag because my application uses ssl for sending emails. Is there a way to fix this ?