increase limits
This commit is contained in:
@@ -93,7 +93,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
.filter_map(|r| future::ready(r.ok()))
|
||||
.map(BaseChannel::with_defaults)
|
||||
// Limit channels to 1 per IP.
|
||||
.max_channels_per_key(1, |t| t.transport().peer_addr().unwrap().ip())
|
||||
.max_channels_per_key(2048, |t| t.transport().peer_addr().unwrap().ip())
|
||||
// serve is generated by the service attribute. It takes as input any type implementing
|
||||
// the generated World trait.
|
||||
.map(|channel| {
|
||||
@@ -101,7 +101,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
channel.execute(server.serve()).for_each(spawn)
|
||||
})
|
||||
// Max 10 channels.
|
||||
.buffer_unordered(10)
|
||||
.buffer_unordered(4096)
|
||||
.for_each(|_| async {})
|
||||
.await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user