mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-15 08:29:25 +01:00
Stop setting API ring buffer capacity if not specified. (#552)
This commit is contained in:
parent
b81ff9c008
commit
5132d8f097
@ -33,7 +33,9 @@ func New(cfg *bridge.Config) bridge.Bridger {
|
|||||||
e.HideBanner = true
|
e.HideBanner = true
|
||||||
e.HidePort = true
|
e.HidePort = true
|
||||||
b.Messages = ring.Ring{}
|
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") != "" {
|
if b.GetString("Token") != "" {
|
||||||
e.Use(middleware.KeyAuth(func(key string, c echo.Context) (bool, error) {
|
e.Use(middleware.KeyAuth(func(key string, c echo.Context) (bool, error) {
|
||||||
return key == b.GetString("Token"), nil
|
return key == b.GetString("Token"), nil
|
||||||
|
@ -1214,6 +1214,7 @@ ShowTopicChange=false
|
|||||||
BindAddress="127.0.0.1:4242"
|
BindAddress="127.0.0.1:4242"
|
||||||
|
|
||||||
#Amount of messages to keep in memory
|
#Amount of messages to keep in memory
|
||||||
|
#OPTIONAL (library default 10)
|
||||||
Buffer=1000
|
Buffer=1000
|
||||||
|
|
||||||
#Bearer token used for authentication
|
#Bearer token used for authentication
|
||||||
|
Loading…
Reference in New Issue
Block a user