mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 12:52:26 -05:00
[bugfix] return early in websocket upgrade handler (#1315)
* launch websocket streaming in goroutine to allow upgrade handler to return * don't send any message on ping, improved close check on failed read * use context to signal wsconn close, ensure canceled in read goroutine Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
98edd75f1b
commit
1bda6a2002
4 changed files with 110 additions and 70 deletions
|
|
@ -19,6 +19,8 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/api/client/accounts"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/api/client/admin"
|
||||
|
|
@ -122,7 +124,7 @@ func NewClient(db db.DB, p processing.Processor) *Client {
|
|||
notifications: notifications.New(p),
|
||||
search: search.New(p),
|
||||
statuses: statuses.New(p),
|
||||
streaming: streaming.New(p),
|
||||
streaming: streaming.New(p, time.Second*30, 4096),
|
||||
timelines: timelines.New(p),
|
||||
user: user.New(p),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue