diff --git a/exec/load/json-db.js b/exec/load/json-db.js index 5e42c9d85c77c53e8f1ef572db1f5dc571020b44..d769b69bd46b04bc29630d859c7fa4b44145b55a 100644 --- a/exec/load/json-db.js +++ b/exec/load/json-db.js @@ -132,8 +132,9 @@ function JSONdb (fileName) { record.subtime = Date.now(); send_subscriber_updates(client,record,"SUBSCRIBE"); } - else { - this.error(client,errors.DUPLICATE_SUB); + else if(this.subscriptions[client.id][record.location]) { + log(LOG_WARNING,"duplicate subscription: " + client.id + "@" + record.location); + //this.error(client,errors.DUPLICATE_SUB); } return true; }; @@ -149,7 +150,8 @@ function JSONdb (fileName) { send_subscriber_updates(client,record,"UNSUBSCRIBE"); } else { - this.error(client,errors.INVALID_REQUEST); + log(LOG_WARNING,"invalid subscription: " + client.id + "@" + record.location); + //this.error(client,errors.INVALID_REQUEST); } return true; };