Skip to content

Issue915 clean #1028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Issue915 clean #1028

wants to merge 7 commits into from

Conversation

sreenidhidrIBM
Copy link

No description provided.

Signed-off-by: SREENIDHI DR <[email protected]>
Signed-off-by: SREENIDHI DR <[email protected]>
Signed-off-by: sreenidhi <[email protected]>
if err != nil {
span.RecordError(err)
return nil, errors.WithMessage(err, "failed to read audit event")
}
if len(signature) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this check needed? it might be misleading as to what is expected from the code if this can't happen. normally I expect that if err == nil, there data is valid.


msg, err := ReadMessage(context.Session(), time.Minute*4)
jsonSession := session2.JSON(context)
msg, err := jsonSession.ReceiveRawWithTimeout(time.Minute * 4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could also extract these durations to constants, depending on what we are waiting for, e.g. signatureRcvTimeout, txRcvTimeout, to make sure we are aligned and to have a better overview. ideally I would even add them as fields in the structure objects and set the default values in the constructors.

Copy link
Contributor

@alexandrosfilios alexandrosfilios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments to address

Signed-off-by: sreenidhi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants