summaryrefslogtreecommitdiffstats
path: root/bridge/api/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/api/api.go')
-rw-r--r--bridge/api/api.go4
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