Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

updata Streaming Responses #819

Open
wants to merge 1 commit into
base: docs/source
Choose a base branch
from

Conversation

binSaed
Copy link

@binSaed binSaed commented Apr 22, 2020

use
final StreamController controller = StreamController.broadcast();
instead of
final StreamController controller = StreamController();

the error with old code when more than Client connect to /stream
[SEVERE] aqueduct: Failed to send response, draining request. Reason: Bad state: StreamSink is bound to a stream

to allow Multi listener to Stream

use 
final StreamController<String> controller = StreamController<String>.broadcast(); 
instead of
final StreamController<String> controller = StreamController<String>();

the error with old code when more than Client connect to /stream
[SEVERE] aqueduct: Failed to send response, draining request. Reason: Bad state: StreamSink is bound to a stream  

to allow Multi listener to Stream
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant