Skip to content

Commit

Permalink
Merge pull request #4 from Lughus/develop
Browse files Browse the repository at this point in the history
fix major bug with uuid destinator
  • Loading branch information
Westixy authored Jun 7, 2018
2 parents b5676a7 + a428743 commit 53725b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lug/e-pigeon",
"version": "1.0.1",
"version": "1.0.2",
"description": "Handmade messaging protocol implemented in js",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class EPigeonServer {
let dstClients = []
dbg('find client:', clients, message)
if (typeof message.to === 'string') {
let client = clients.find(c => c.uuid = message.to)
let client = clients.find(c => c.uuid === message.to)
if (client !== undefined) dstClients.push(client)
} else if (typeof message.to === 'object') {
for (let client of clients)
Expand Down Expand Up @@ -177,7 +177,6 @@ class EPigeonServer {
const client = this._findFromSocket(socket)
dbg('message recieved from :', client, message)
dbgx('message recieved:', message)
dbgx('--- ', client._lastEmitId, message.id)
this._confirmMessage(socket, message)
client._waitList.push(message)
// send all in wait list
Expand Down Expand Up @@ -311,6 +310,7 @@ class EPigeonServer {
action: 'session.update',
payload: {
uuid: client.uuid,
connected: true,
session
}
})
Expand Down

0 comments on commit 53725b4

Please sign in to comment.