fix grpc client error #2

Merged
valy merged 1 commits from noormohammedb/hacker-challenge-sgx-general:patch_grpc_error into main 2024-12-29 00:03:41 +00:00
Member

reset timeout on inbound message insted of creating new timer which was triggering timeout

reset timeout on inbound message insted of creating new timer which was triggering timeout
noormohammedb added 1 commit 2024-12-27 10:08:59 +00:00
reset timeout on inbound message insted of creating new timer which was triggering timeout
noormohammedb changed title from fix grpc client error to WIP: fix grpc client error 2024-12-27 10:14:39 +00:00
noormohammedb changed title from WIP: fix grpc client error to fix grpc client error 2024-12-27 10:14:46 +00:00
noormohammedb requested review from valy 2024-12-27 10:14:55 +00:00
noormohammedb requested review from ghe0 2024-12-27 10:14:55 +00:00
Author
Member

while creating new interval, its immediately ticking, so in the next iteration timeout.tick() tokio select branch get completes and disconnecting
https://docs.rs/tokio/latest/tokio/time/fn.interval.html
https://docs.rs/tokio/latest/tokio/macro.select.html

while creating new interval, its immediately ticking, so in the next iteration `timeout.tick()` tokio select branch get completes and disconnecting https://docs.rs/tokio/latest/tokio/time/fn.interval.html https://docs.rs/tokio/latest/tokio/macro.select.html
Author
Member

While timeout happening and sending tonic status with message, in client side the error message was different

error_status = Status::internal(format!("Disconnecting after {}s timeout", state.get_timeout().as_secs()));

I got this error while timeout happening on server

[src/grpc/client.rs:135:9] updates.next().await = Some(
    Ok(
        Err(
            Status {
                code: Internal,
                message: "h2 protocol error: http2 error",
                source: Some(
                    hyper::Error(
                        Http2,
                        Error {
                            kind: Reset(
                                StreamId(
                                    1,
                                ),
                                NO_ERROR,
                                Remote,
                            ),
                        },
                    ),
                ),
            },
        ),
    ),
)
While timeout happening and sending tonic status with message, in client side the error message was different https://gitea.detee.cloud/general/hacker-challenge/src/commit/4a6e8c4c73dcc9dd99e875438f6c7a2d77822bda/src/grpc/server.rs#L205 I got this error while timeout happening on server ```rust [src/grpc/client.rs:135:9] updates.next().await = Some( Ok( Err( Status { code: Internal, message: "h2 protocol error: http2 error", source: Some( hyper::Error( Http2, Error { kind: Reset( StreamId( 1, ), NO_ERROR, Remote, ), }, ), ), }, ), ), ) ```
valy merged commit 8226f03e7c into main 2024-12-29 00:03:41 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: general/hacker-challenge#2
No description provided.