Skip to content

Commit

Permalink
Merge pull request #30 from bnielsen1965/master
Browse files Browse the repository at this point in the history
Fix bug in server example by adding request transactionId to response…
  • Loading branch information
reklatsmasters authored Jan 15, 2020
2 parents f902397 + 2469f3c commit e5ef562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/stun-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { STUN_BINDING_RESPONSE, STUN_EVENT_BINDING_REQUEST } = stun.constants;
const userAgent = `node/${process.version} stun/v1.0.0`;

server.on(STUN_EVENT_BINDING_REQUEST, (request, rinfo) => {
const message = stun.createMessage(STUN_BINDING_RESPONSE);
const message = stun.createMessage(STUN_BINDING_RESPONSE, request.transactionId);

message.addXorAddress(rinfo.address, rinfo.port);
message.addSoftware(userAgent);
Expand Down

0 comments on commit e5ef562

Please sign in to comment.