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

Unified timeout for sending a message #69

Open
rahulghangas opened this issue Feb 27, 2021 · 1 comment
Open

Unified timeout for sending a message #69

rahulghangas opened this issue Feb 27, 2021 · 1 comment

Comments

@rahulghangas
Copy link
Contributor

Currently the Send method in the peer module, and consequently, the Send method in transport uses a user supplied context for timeout. This causes multiple timing issues across gossipping and syncing if not configured with proper times. Also, using two different timeouts can get confusing. There are two potential solution that come to mind

  1. remove the context parameter and have a single timeout for Send that gets configured while creating the transport layer.
  2. Since some messages might be quite big and might not finish in the timeout specified in the transport layer, create two methods for sending a message
    • where the timeout field from the transport layer is used
    • where the user supplies the context with a custom timeout
@rahulghangas
Copy link
Contributor Author

This came up while working on a fix for #70

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

No branches or pull requests

1 participant