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

Fix transport manager hangs and various improvements. #376

Merged
merged 4 commits into from
May 27, 2020

Conversation

evanlinjin
Copy link
Contributor

Fixes #375

Changes:

  • Restructured (transport.Manager).SaveTransport to improve readability and ensure we always close the managed transport before calling mTp.wg.Wait(). In fact, we are now using mTp.Close() directly (which does both).
  • Visor's RPC client timeout is now optional. Setting a value of 0 duration will result in no timeout.
  • Disabled visor RPC client timeout for visor CLI.

Additional Changes:

  • Wait for dmsg network during visor startup.

How to test this PR:

  • Start a skywire-visor.
  • Add transports of different types via skywire-cli.
  • Nothing should hang indefinitely.

* Restructured (transport.Manager).SaveTransport to improve readability and ensure we always close the managed transport before calling mTp.wg.Wait(). In fact, we are now using mTp.Close() directly (which does both).
* Visor's RPC client timeout is now optional. Setting a value of 0 duration will result in no timeout.
* Disabled visor RPC client timeout for visor CLI.
Copy link
Contributor

@Darkren Darkren left a comment

Choose a reason for hiding this comment

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

Could you please do just a minor change? Otherwise, really great job!

pkg/transport/manager.go Outdated Show resolved Hide resolved
Copy link
Contributor

@nkryuchkov nkryuchkov left a comment

Choose a reason for hiding this comment

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

Except for the @Darkren 's note, the code looks good to me. But not sure about the timeout. Great job!

cmd/skywire-cli/commands/visor/root.go Show resolved Hide resolved
* Replaced goto statement with for loop in transport.Manager
@evanlinjin evanlinjin force-pushed the fix/tpm-hangs-#375 branch from 4db4c08 to c84dbe7 Compare May 27, 2020 14:29
@evanlinjin evanlinjin merged commit 84fd905 into develop May 27, 2020
@evanlinjin evanlinjin deleted the fix/tpm-hangs-#375 branch May 27, 2020 14:49
jdknives pushed a commit that referenced this pull request Oct 19, 2020
Fix transport manager hangs and various improvements.

Former-commit-id: 84fd905
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.

3 participants