From 9800ed719bd5bf50aef488f4d46b449729d36a1b Mon Sep 17 00:00:00 2001 From: Alexander Emelin Date: Mon, 28 Dec 2020 20:29:48 +0300 Subject: [PATCH] prepare v2.8.1 release --- CHANGELOG.md | 9 +++++++++ go.mod | 2 +- go.sum | 4 ++-- misc/release/notes.md | 12 +++--------- .../github.com/centrifugal/centrifuge/changelog.md | 5 +++++ vendor/github.com/centrifugal/centrifuge/client.go | 8 ++++++-- vendor/modules.txt | 2 +- 7 files changed, 27 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a32fae0735..f3adbeade3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +v2.8.1 +====== + +No backwards incompatible changes here. + +Fixes: + +* fix concurrent map access which could result in runtime crash when using presence feature. + v2.8.0 ====== diff --git a/go.mod b/go.mod index 06eb1f95fb..eb303eac1e 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/FZambia/statik v0.1.2-0.20180217151304-b9f012bb2a1b github.com/FZambia/viper-lite v0.0.0-20171108064948-d5a31e6aa18b github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af - github.com/centrifugal/centrifuge v0.14.1 + github.com/centrifugal/centrifuge v0.14.2 github.com/centrifugal/protocol v0.3.4 github.com/cristalhq/jwt/v3 v3.0.0 github.com/gogo/protobuf v1.3.1 diff --git a/go.sum b/go.sum index c1c6ca4c99..2287be7d41 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/centrifugal/centrifuge v0.14.1 h1:jHwPcXjcg3oMVh9qD91uAcXvjGCnJEyp111j1ou5NCg= -github.com/centrifugal/centrifuge v0.14.1/go.mod h1:jdFw/2dBFpME3OTisc5FVAC1ilqodnyMnQFjem0k0yg= +github.com/centrifugal/centrifuge v0.14.2 h1:a4X2XykGnnmM48/m5oRMLrxxo7IuphZ1qVaMm0QcK0g= +github.com/centrifugal/centrifuge v0.14.2/go.mod h1:jdFw/2dBFpME3OTisc5FVAC1ilqodnyMnQFjem0k0yg= github.com/centrifugal/protocol v0.3.4 h1:9q22iSp4CQOdQahfopvfmWWxDbj1Lo7ERG2j56mAxkE= github.com/centrifugal/protocol v0.3.4/go.mod h1:2YbBCaDwQHl37ErRdMrKSj18X2yVvpkQYtSX6aVbe5A= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= diff --git a/misc/release/notes.md b/misc/release/notes.md index 9d528c86df..941459194f 100644 --- a/misc/release/notes.md +++ b/misc/release/notes.md @@ -1,11 +1,5 @@ -Minor backwards incompatible changes here when using `client_user_connection_limit` option – see below. +No backwards incompatible changes here. -Centrifugo v2.8.0 has many internal changes that could affect overall performance and latency. In general, we expect better latency between a client and a server, but servers under heavy load can notice a small regression in CPU usage. +Fixes: -Improvements: - -* Centrifugo can now maintain a single connection from a user when personal server-side channel used. See [#396](https://github.com/centrifugal/centrifugo/issues/396) and [docs](https://centrifugal.github.io/centrifugo/server/server_subs/#maintain-single-user-connection) -* New option `client_concurrency`. This option allows processing client commands concurrently. Depending on your use case this option has potential to radically reduce latency between a client and Centrifugo. See [detailed description in docs](https://centrifugal.github.io/centrifugo/server/configuration/#client_concurrency) -* When using `client_user_connection_limit` and user reaches max amount of connections Centrifugo will now disconnect client with `connection limit` reason instead of returning `limit exceeded` error. Centrifugo will give a client advice to not reconnect. - -Centrifugo v2.8.0 based on latest Go 1.15.5 +* fix concurrent map access which could result in runtime crash when using presence feature. diff --git a/vendor/github.com/centrifugal/centrifuge/changelog.md b/vendor/github.com/centrifugal/centrifuge/changelog.md index d55108b02d..286fcc7b05 100644 --- a/vendor/github.com/centrifugal/centrifuge/changelog.md +++ b/vendor/github.com/centrifugal/centrifuge/changelog.md @@ -1,3 +1,8 @@ +v0.14.2 +======= + +* fix concurrent map access which could result into runtime crash when using presence feature in channels. + v0.14.1 ======= diff --git a/vendor/github.com/centrifugal/centrifuge/client.go b/vendor/github.com/centrifugal/centrifuge/client.go index 036a256ad5..7099bd7c50 100644 --- a/vendor/github.com/centrifugal/centrifuge/client.go +++ b/vendor/github.com/centrifugal/centrifuge/client.go @@ -338,8 +338,12 @@ func (c *Client) updateChannelPresence(ch string, chCtx channelContext) error { if !channelHasFlag(chCtx.flags, flagPresence) { return nil } - info := c.clientInfo(ch) - return c.node.addPresence(ch, c.uid, info) + return c.node.addPresence(ch, c.uid, &ClientInfo{ + UserID: c.user, + ClientID: c.uid, + ConnInfo: c.info, + ChanInfo: chCtx.Info, + }) } // Context returns client Context. This context will be canceled diff --git a/vendor/modules.txt b/vendor/modules.txt index 2bd148252a..86c0ea3658 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -10,7 +10,7 @@ github.com/FZambia/viper-lite github.com/ajstarks/svgo # github.com/beorn7/perks v1.0.1 github.com/beorn7/perks/quantile -# github.com/centrifugal/centrifuge v0.14.1 +# github.com/centrifugal/centrifuge v0.14.2 github.com/centrifugal/centrifuge github.com/centrifugal/centrifuge/internal/bufpool github.com/centrifugal/centrifuge/internal/cancelctx