Skip to content

Commit

Permalink
Change uuid/v5 to uuid/v4 for a random id (#319)
Browse files Browse the repository at this point in the history
* Change uuid/v5 to uuid/v4 for a random id

* Update README.md
  • Loading branch information
gnought committed Sep 2, 2019
1 parent 280bae5 commit 27d7ab3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Options:
* `connectTimeout`: the max number of milliseconds to wait for the CONNECT
packet to arrive, defaults to `30000` milliseconds
* `id`: id used to identify this broker instance in `$SYS` messages,
defaults to `uuidv5()`
defaults to `uuidv4()`
* `preConnect`: function called when a valid CONNECT is received, see
[instance.preConnect()](#preConnect)
* `authenticate`: function used to authenticate clients, see
Expand Down
4 changes: 2 additions & 2 deletions aedes.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var util = require('util')
var memory = require('aedes-persistence')
var parallel = require('fastparallel')
var series = require('fastseries')
var uuidv5 = require('uuid/v5')
var uuidv4 = require('uuid/v4')
var Packet = require('aedes-packet')
var bulk = require('bulk-write-stream')
var reusify = require('reusify')
Expand Down Expand Up @@ -36,7 +36,7 @@ function Aedes (opts) {

opts = Object.assign({}, defaultOptions, opts)

this.id = opts.id || uuidv5('https://github.com/mcollina/aedes', uuidv5.URL)
this.id = opts.id || uuidv4()
this.counter = 0
this.connectTimeout = opts.connectTimeout
this.mq = opts.mq || mqemitter(opts)
Expand Down

0 comments on commit 27d7ab3

Please sign in to comment.