Page MenuHomePhabricator

[CommCoreModule] Set `readyState` to `SocketStatus::CLOSED` on `ClientGetReadReactor::OnDone`
ClosedPublic

Authored by atul on Feb 7 2022, 5:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 5 2024, 12:50 AM
Unknown Object (File)
Oct 23 2024, 4:08 PM
Unknown Object (File)
Oct 23 2024, 9:55 AM
Unknown Object (File)
Oct 23 2024, 9:55 AM
Unknown Object (File)
Oct 23 2024, 9:53 AM
Unknown Object (File)
Oct 23 2024, 9:53 AM
Unknown Object (File)
Oct 21 2024, 12:20 PM
Unknown Object (File)
Oct 21 2024, 12:20 PM

Details

Summary

Set readyState to 3: CLOSED once the Get() stream is closed.

Test Plan

Logged readyState and it was as expected

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Feb 7 2022, 5:17 AM
karol added inline comments.
native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp
59 ↗(On Diff #9334)
  1. Should we provide a name status?
  2. Should we handle different values of status? Is there a possibility of encountering an error? Should we throw in such a case?
native/cpp/CommonCpp/grpc/ClientGetReadReactor.h
31 ↗(On Diff #9334)

How about going for consistency?

This revision is now accepted and ready to land.Feb 7 2022, 7:20 AM
This revision now requires review to proceed.Feb 7 2022, 7:20 AM
native/cpp/CommonCpp/grpc/ClientGetReadReactor.h
31 ↗(On Diff #9334)

Thanks for catching that, will update this diff with that change

native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp
59 ↗(On Diff #9334)

Should we handle different values of status? Is there a possibility of encountering an error? Should we throw in such a case?

I don't think so?

OnDone is called by the gRPC threads when the Get stream is closed . status gives us an idea of why it may have closed, but I think we only need to worry about setting readyState correctly.

I definitely don't think we want to throw, we should be able to handle things gracefully with just readyState

This revision is now accepted and ready to land.Feb 7 2022, 7:25 PM