Skip to content
Snippets Groups Projects
Commit f1636ac4 authored by mcmlxxix's avatar mcmlxxix
Browse files

do not throw an exception duplicate subscriptions or invalid subscriptions

parent f74fc38e
Branches
Tags
No related merge requests found
......@@ -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;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment