From f5d8a91bab4eb63307617f0ea2ec256a59a27ac6 Mon Sep 17 00:00:00 2001 From: Endel Dreyer Date: Thu, 15 Mar 2018 18:46:37 -0300 Subject: [PATCH] disable auto-reconnection to room's. only Client can reconnect. --- package.json | 4 ++-- src/Room.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fd8b1df..443b305 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "colyseus.js", - "version": "0.8.3", + "version": "0.8.4", "description": "Multiplayer Game Client for the Browser", "keywords": [ "multiplayer", @@ -29,7 +29,7 @@ }, "dependencies": { "@gamestdio/clock": "^1.1.0", - "@gamestdio/websocket": "^0.2.2", + "@gamestdio/websocket": "^0.2.3", "delta-listener": "^2.1.2", "fossil-delta": "^1.0.0", "notepack.io": "^2.1.2", diff --git a/src/Room.ts b/src/Room.ts index 523cf22..ec23881 100644 --- a/src/Room.ts +++ b/src/Room.ts @@ -41,6 +41,7 @@ export class Room extends DeltaContainer { connect (connection: Connection) { this.connection = connection; + this.connection.reconnectEnabled = false; this.connection.onmessage = this.onMessageCallback.bind(this); this.connection.onclose = (e) => this.onLeave.dispatch(e); }