Skip to content

[BUG] Crashing on requests happening too fast #109

@PaulDotSH

Description

@PaulDotSH

With the sample code

    let mut client = RpcClientBuilder::new()
        .build("http://127.0.0.1:38085")
        .unwrap();
    let mut wallet = client.wallet();
    println!("{:?}", wallet.open_wallet("test-wallet".to_string(), Some("test141414A".to_string())).await);
    
    let foo = wallet.get_balance(0, None).await;
    println!("{:?}", foo);

The following program crashes, with the error

Err(error sending request for url (http://127.0.0.1:38085/json_rpc): connection closed before message completed

Caused by:
connection closed before message completed)

However, adding a sleep between the open_wallet and get_balance requests makes it work as intended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions