fix(ui): activity Indicator switching constantly between online/offline (#5054)
When using HTTP2, setting the writeTimeout too low causes the channel to close before the keepAlive event has a chance of beeing sent. Signed-off-by: rca <raphael.catolino@gmail.com> Co-authored-by: Deluan Quintão <deluan@navidrome.org>
This commit is contained in:
parent
5fa8356b31
commit
44a5482493
1 changed files with 3 additions and 2 deletions
|
|
@ -24,8 +24,9 @@ type Broker interface {
|
||||||
|
|
||||||
const (
|
const (
|
||||||
keepAliveFrequency = 15 * time.Second
|
keepAliveFrequency = 15 * time.Second
|
||||||
writeTimeOut = 5 * time.Second
|
// The timeout must be higher than the keepAliveFrequency, or the lack of activity will cause the channel to close.
|
||||||
bufferSize = 1
|
writeTimeOut = keepAliveFrequency + 5*time.Second
|
||||||
|
bufferSize = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue