Skip to content
Browse files

Merge pull request #19 from TimMensch/justfix1

Two fixes for luamongo
  • Loading branch information...
2 parents 638a245 + f8de2da commit db2547fca001e514ecaa71e3201e6e0282033a00 @larubbio larubbio committed Apr 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 mongo_connection.cpp
View
4 mongo_connection.cpp
@@ -36,13 +36,13 @@ static int connection_new(lua_State *L) {
try {
bool auto_reconnect;
- int rw_timeout;
+ double rw_timeout=0;
if (lua_type(L,1) == LUA_TTABLE) {
// extract arguments from table
lua_getfield(L, 1, "auto_reconnect");
auto_reconnect = lua_toboolean(L, -1);
lua_getfield(L, 1, "rw_timeout");
- int rw_timeout = lua_tointeger(L, -1);
+ rw_timeout = lua_tonumber(L, -1);
lua_pop(L, 2);
} else {
auto_reconnect = false;

0 comments on commit db2547f

Please sign in to comment.
Something went wrong with that request. Please try again.