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:
@@ -24,7 +24,8 @@ 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.
|
||||||
|
writeTimeOut = keepAliveFrequency + 5*time.Second
|
||||||
bufferSize = 1
|
bufferSize = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user