Skip to content

Commit

Permalink
fix(workaround): event loop block (#86)
Browse files Browse the repository at this point in the history
jjeffcaii authored Nov 19, 2020
1 parent c87c7eb commit 1787d76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/socket/duplex.go
Original file line number Diff line number Diff line change
@@ -510,6 +510,7 @@ func (dc *DuplexConnection) respondRequestResponse(receiving fragmentation.Heade
sending.SubscribeWith(context.Background(), sub)
return nil
}

if err := scheduler.Elastic().Worker().Do(func() {
sending.SubscribeWith(context.Background(), sub)
}); err != nil {
@@ -866,7 +867,8 @@ func (dc *DuplexConnection) onFramePayload(frame core.BufferedFrame) error {
switch handler := v.(type) {
case *requestResponseCallback:
handler.cache = next
handler.sink.Success(next)
// TODO: workaround for processor sink bug
go handler.sink.Success(next)
case requestStreamCallback:
fg := h.Flag()
isNext := fg.Check(core.FlagNext)

0 comments on commit 1787d76

Please sign in to comment.