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 panic when "http.port" is already in use #1621

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

cmosd
Copy link
Contributor

@cmosd cmosd commented Nov 30, 2022

Proposed changes

This fix should prevent tedge-agent from panicking if the http port is already in use.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue

#1617

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@cmosd cmosd marked this pull request as ready for review November 30, 2022 13:47
@cmosd
Copy link
Contributor Author

cmosd commented Nov 30, 2022

Example of error when binding to the same address:

image

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved

Oops I approved before noticing the tests are broken.

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

The tests must be fixed

This fix prevents `tedge-agent` from panicking if the http port is
already in use.

Signed-off-by: alexandru solomes <solo@softwareag.com>
@cmosd cmosd force-pushed the bugfix/1617/http-bind-address branch from d1bb8df to 74698bf Compare November 30, 2022 19:04
Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved

@cmosd cmosd merged commit 0b5f6fd into thin-edge:main Dec 1, 2022
@cmosd cmosd deleted the bugfix/1617/http-bind-address branch December 1, 2022 08:50
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.

None yet

2 participants