Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change uuid/v5 to uuid/v4 for a random id #319

Merged
merged 2 commits into from
Sep 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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