Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 7edc81d

Browse files
committed
give more RAM to the bind demo
1 parent 0245b24 commit 7edc81d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,9 +704,9 @@ fn test_mqtt_client() -> Result<EspMqttClient<'static, ConnState<MessageImpl, Es
704704

705705
#[cfg(not(esp_idf_version = "4.3"))]
706706
fn test_tcp_bind_async() -> anyhow::Result<()> {
707-
async fn test_tcp_bind() -> std::io::Result<()> {
708-
let executor = async_executor::LocalExecutor::new();
707+
use async_executor::LocalExecutor;
709708

709+
async fn test_tcp_bind(executor: &LocalExecutor<'_>) -> std::io::Result<()> {
710710
/// Echoes messages from the client back to it.
711711
async fn echo(stream: async_io::Async<TcpStream>) -> std::io::Result<()> {
712712
futures_lite::io::copy(&stream, &mut &stream).await?;
@@ -741,7 +741,9 @@ fn test_tcp_bind_async() -> anyhow::Result<()> {
741741
}
742742

743743
thread::Builder::new().stack_size(20000).spawn(move || {
744-
async_io::block_on(test_tcp_bind()).unwrap();
744+
let executor = LocalExecutor::new();
745+
746+
async_io::block_on(test_tcp_bind(&executor)).unwrap();
745747
})?;
746748

747749
Ok(())

0 commit comments

Comments
 (0)