From bb04f0ff8369134cc5fef4308292c63a81a8bf4d Mon Sep 17 00:00:00 2001 From: Yiin Date: Tue, 27 Mar 2018 15:35:37 +0300 Subject: [PATCH] Use uuid.v4 instead of v1 v1 is based on timestamp, and gives same uuid when methods/subscriptions are called at the same time. --- src/RealTimeAPI.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RealTimeAPI.ts b/src/RealTimeAPI.ts index a6b929a..480b74f 100644 --- a/src/RealTimeAPI.ts +++ b/src/RealTimeAPI.ts @@ -4,7 +4,7 @@ import { Observable } from "rxjs"; import { WebSocketSubject } from 'rxjs/observable/dom/WebSocketSubject'; -import { v1 as uuid } from "uuid"; +import { v4 as uuid } from "uuid"; import { SHA256 } from "crypto-js"; export class RealTimeAPI { @@ -214,4 +214,4 @@ export class RealTimeAPI { ); return subscription; } -} \ No newline at end of file +}