Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.
This repository was archived by the owner on May 5, 2021. It is now read-only.

Bug in utils.js createId(), may create duplicate subscription id's #91

@hakjac

Description

@hakjac

The createId() method is supposed to create unique subscription ids, but as it is implemented today it may create duplicate id's when several id's is generated during the same millisecond, since it just appends a random number between 0-1000 to the current millisecond.

The method must ensure to never return an id that previously been returned. There are several options of doing this, e.g. keeping track and checking against the id's generated for the current millisecond is one way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions