refactor(streaming): improve signal handling and remove unused components
This commit is contained in:
parent
c5d4c4f3e3
commit
75df0e4308
9 changed files with 19 additions and 1056 deletions
|
|
@ -169,7 +169,11 @@ func (s *SignalEventStream) read() {
|
|||
if eventName == "" || eventName == "signal" {
|
||||
var msg SignalMessage
|
||||
if err := json.Unmarshal(dataBuf.Bytes(), &msg); err == nil {
|
||||
s.events <- msg
|
||||
select {
|
||||
case s.events <- msg:
|
||||
case <-s.resp.Request.Context().Done():
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
dataBuf.Reset()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue