Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add bounded timeout to ipfs_pin::cat #43

Open

Description

Summary

The cat function in crates/gitlawb-node/src/ipfs_pin.rs (introduced in 74b7a40 as part of the B1 fetch work) issues a reqwest::Client::new().post(...).send().await? with no explicit request timeout. A stalled or slow Kubo node can hang the handler indefinitely.

Suggested fix

Add a bounded timeout to the cat request, e.g.:

use std::time::Duration;
let resp = reqwest::Client::builder()
 .timeout(Duration::from_secs(30))
 .build()?
 .post(&url)
 .send()
 .await?;

The timeout value should be tunable (configurable constant or env-driven) to account for worst-case envelope size / read latency in production.

Context

Flagged during review of PR #40 (recipient-set blinding at rest). Deferred to address in the encrypted-replication lane.

Backlinks: #40 (comment)

/cc @beardthelion

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

        AltStyle によって変換されたページ (->オリジナル) /