Commit e71db022 authored by Steve Johnson's avatar Steve Johnson

added exception handler for parsing bad messages

parent 9bed0571
......@@ -1214,6 +1214,8 @@ function SSDP(serviceType) {
}
this.parseCommand = function parseCommand(msg, rinfo) {
try {
var lines = msg.toString().split("\r\n");
var type = lines.shift().split(' ');
var method = type[0];
......@@ -1254,6 +1256,8 @@ function SSDP(serviceType) {
console.log("Unknown message: \r\n"+msg);
}
}
catch(e) {}
}
this.parseResponse = function parseResponse(msg, rinfo) {
//this.emit('response', msg, rinfo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment