Skip to content
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

Prevent deadlock on connection close and expose connection to the stream context #52

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Nov 6, 2024

Update Frisbee and Polyglot to retrieve latest bug fixes (mainly loopholelabs/polyglot#87 and loopholelabs/frisbee-go#180).

Fixes a deadlock bug where, during an RPC, the generated method blocks until a response is received or the passed context is cancelled, but if the connection is closed while waiting for either event, the method remains blocked.

The new generated code also listens for a connection close event, unblocking the method.

It is also useful in some situations to access the raw connection from a stream, so expose via the stream context.

During an RPC, the generated method blocks until a response is received
or the passed context is cancelled, but if the connection is closed
while waiting for either event, the method remains blocked.

The new generated code also listens for a connection close event,
unblocking the method.

Signed-off-by: Luiz Aoqui <[email protected]>
When running in CI, tests can run slower than on local machine,
specially when `-race` is used. Bump the timeout used in
`TestRPCInvalidConnection` to account for that.

Signed-off-by: Luiz Aoqui <[email protected]>
SuperManifolds
SuperManifolds previously approved these changes Nov 7, 2024
Copy link
Contributor

@SuperManifolds SuperManifolds left a comment

Choose a reason for hiding this comment

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

LGTM but now that we've merged in loopholelabs/frisbee-go#183 could you bump frisbe up to 10.2 before merging?

@lgfa29
Copy link
Contributor Author

lgfa29 commented Nov 7, 2024

LGTM but now that we've merged in loopholelabs/frisbee-go#183 could you bump frisbe up to 10.2 before merging?

Good point, bumped!

@lgfa29 lgfa29 merged commit 03eadf8 into main Nov 7, 2024
4 checks passed
@lgfa29 lgfa29 deleted the fixes-and-updates branch November 7, 2024 14:29
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