diff options
author | Patrick Connolly <patrick.c.connolly@gmail.com> | 2018-11-06 04:53:51 +0800 |
---|---|---|
committer | Wim <wim@42.be> | 2018-11-05 21:53:51 +0100 |
commit | 5132d8f097a7eef2cb3d43c1c4cd297bc8254df5 (patch) | |
tree | cbd36bfbbb84ed9123bb5adb5b9fe763ccef2511 /bridge | |
parent | b81ff9c008ed3084c6bf2d6fe6bfbc077546d6ac (diff) | |
download | matterbridge-msglm-5132d8f097a7eef2cb3d43c1c4cd297bc8254df5.tar.gz matterbridge-msglm-5132d8f097a7eef2cb3d43c1c4cd297bc8254df5.tar.bz2 matterbridge-msglm-5132d8f097a7eef2cb3d43c1c4cd297bc8254df5.zip |
Stop setting API ring buffer capacity if not specified. (#552)
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/api/api.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bridge/api/api.go b/bridge/api/api.go index 0ccd85b6..1efe7558 100644 --- a/bridge/api/api.go +++ b/bridge/api/api.go @@ -33,7 +33,9 @@ func New(cfg *bridge.Config) bridge.Bridger { e.HideBanner = true e.HidePort = true b.Messages = ring.Ring{} - b.Messages.SetCapacity(b.GetInt("Buffer")) + if b.GetInt("Buffer") != 0 { + b.Messages.SetCapacity(b.GetInt("Buffer")) + } if b.GetString("Token") != "" { e.Use(middleware.KeyAuth(func(key string, c echo.Context) (bool, error) { return key == b.GetString("Token"), nil |