diff --git a/lib/Meteor.coffee b/lib/Meteor.coffee index badf914..15ccfa3 100755 --- a/lib/Meteor.coffee +++ b/lib/Meteor.coffee @@ -187,7 +187,6 @@ class Meteor extends EventEmitter hasStartedMongoDBText: (buffer)=> if buffer.lastIndexOf('Started MongoDB') isnt -1 @mongodb = new MeteorMongodb(@childProcess.child.pid) - @emit "mongodb ready" hasErrorText: (buffer)=> diff --git a/lib/MeteorMongodb.coffee b/lib/MeteorMongodb.coffee index 843bf0f..ecef8ec 100755 --- a/lib/MeteorMongodb.coffee +++ b/lib/MeteorMongodb.coffee @@ -30,12 +30,13 @@ class MeteorMongodb extends EventEmitter ppid: @meteorPid , (err, resultList )=> @mongodChilds = resultList - if (err) + if (err || resultList.length==0) log.warn "spacjam: Warning: Couldn't find any mongod children:\n", err else if resultList.length > 1 log.warn "spacjam: Warning: Found more than one mongod child:\n", resultList else log.debug "Found meteor mongod child with pid: ", resultList[0].pid + @emit "mongodb ready" kill: ->