Skip to content

Commit

Permalink
return full data in discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
koalazak committed Feb 16, 2017
1 parent e85d174 commit 5106570
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/discovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const dgram = require('dgram');

function discovery (cb) {
function discovery (cb, full) {
const server = dgram.createSocket('udp4');

server.on('error', (err) => {
Expand All @@ -17,7 +17,7 @@ function discovery (cb) {
server.close();
console.log('Robot found! with blid/username: ' + parsedMsg.hostname.split('-')[1]);
console.log(parsedMsg);
cb(null, parsedMsg.ip);
cb(null, full ? parsedMsg : parsedMsg.ip);
}
} catch (e) {}
});
Expand Down

0 comments on commit 5106570

Please sign in to comment.