Skip to content

Commit

Permalink
Update examples/stream/src/main.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Max Inden <mail@max-inden.de>
  • Loading branch information
thomaseizinger and mxinden authored Dec 31, 2023
1 parent ab9284e commit c75b39d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/stream/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async fn main() -> Result<()> {
// Deal with incoming streams.
// Spawning a dedicated task is just one way of doing this.
// libp2p doesn't care how you handle incoming streams but you _must_ handle them somehow.
// To mitigate DoS attacks, libp2p will internally drop incoming streams if your application cannot keep in processing them.
// To mitigate DoS attacks, libp2p will internally drop incoming streams if your application cannot keep up processing them.
tokio::spawn(async move {
// This loop handles incoming streams _sequentially_ but that doesn't have to be the case.
// You can also spawn a dedicated task per stream if you want to.
Expand Down

0 comments on commit c75b39d

Please sign in to comment.