projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '10669-safe-http-cache'
[arvados.git]
/
services
/
ws
/
handler.go
diff --git
a/services/ws/handler.go
b/services/ws/handler.go
index b07b78cc7c3fbbf7c69b39111f1959bb5da96921..72291900fac52c4192f4db971e29bd736be5c189 100644
(file)
--- a/
services/ws/handler.go
+++ b/
services/ws/handler.go
@@
-53,6
+53,8
@@
func (h *handler) Handle(ws wsConn, eventSource eventSource, newSession func(wsC
return
}
return
}
+ // Receive websocket frames from the client and pass them to
+ // sess.Receive().
go func() {
buf := make([]byte, 2<<20)
for {
go func() {
buf := make([]byte, 2<<20)
for {
@@
-84,6
+86,9
@@
func (h *handler) Handle(ws wsConn, eventSource eventSource, newSession func(wsC
}
}()
}
}()
+ // Take items from the outgoing queue, serialize them using
+ // sess.EventMessage() as needed, and send them to the client
+ // as websocket frames.
go func() {
for {
var ok bool
go func() {
for {
var ok bool