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

Commit

Permalink
give more RAM to the bind demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Oct 19, 2023
1 parent 0245b24 commit 7edc81d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,9 @@ fn test_mqtt_client() -> Result<EspMqttClient<'static, ConnState<MessageImpl, Es

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

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

thread::Builder::new().stack_size(20000).spawn(move || {
async_io::block_on(test_tcp_bind()).unwrap();
let executor = LocalExecutor::new();

async_io::block_on(test_tcp_bind(&executor)).unwrap();
})?;

Ok(())
Expand Down

0 comments on commit 7edc81d

Please sign in to comment.