0

I'm using mognojs version 0.7.2 and socket.io, and works fine but when I don`t make queries to datatabase for a while, maybe a timeout close the connection, and after when i try to make any query again the callback response is [Error: connection closed ]

I`m added to add auto_reconnect but I get the same error

var db = require("mongojs").connect(databaseUrl, collections, {auto_reconnect:true});

Thanks for your help.

Alberto De Caro
  • 5,147
  • 9
  • 47
  • 73

1 Answers1

0

In version 0.7.7 on mongojs, there is no forward of connection (server) option to the native mongodb driver layer. Your auto_reconnect is, in my sense, useless here. I'm looking for a workaround for this issue