Commit ca9f96cc authored by Nick Stenning's avatar Nick Stenning

socket: Simplify clientID generation

It's not clear to me why we were using this rather complicated method of
generating a UUID. Suffice to say that simply calling uuid.v4() has much
the same effect.
parent 91d7a00b
getClientId = ->
# Generate client ID
buffer = (new Array(16))
uuid.v4 null, buffer, 0
uuid.unparse buffer
socket = ['documentHelpers', (documentHelpers) ->
-> new Socket("#{documentHelpers.baseURI}__streamer__")
]
......@@ -16,7 +9,7 @@ class Socket extends SockJS
send = this.send
this.send = (data) =>
clientId = getClientId()
clientId = uuid.v4()
$.ajaxSetup
headers:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment