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(p2p): parse maddr correctly #4219

Merged
merged 1 commit into from
Nov 21, 2024
Merged

fix(p2p): parse maddr correctly #4219

merged 1 commit into from
Nov 21, 2024

Conversation

mudler
Copy link
Owner

@mudler mudler commented Nov 21, 2024

Previously in case of not specifying a value it would pass a slice of 1 empty element

Description

This pull request includes changes to improve the configuration handling in the newNodeOpts function within the core/p2p/p2p.go file. The most important change is the modification of how the environment variables for LOCALAI_P2P_LISTEN_MADDRS and LOCALAI_P2P_BOOTSTRAP_PEERS_MADDRS are processed.

Improvements to configuration handling:

  • core/p2p/p2p.go: Modified the newNodeOpts function to handle empty environment variable values more gracefully by checking if the environment variables are non-empty before splitting them into slices.

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Previously in case of not specifying a value it would pass a slice of 1
empty element

Signed-off-by: Ettore Di Giacinto <[email protected]>
Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 0670d3f
🔍 Latest deploy log https://app.netlify.com/sites/localai/deploys/673f04008d677600084fb47d
😎 Deploy Preview https://deploy-preview-4219--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mudler mudler added the bug Something isn't working label Nov 21, 2024
@mudler mudler merged commit 47dc433 into master Nov 21, 2024
31 checks passed
@mudler mudler deleted the fix/p2p_worker branch November 21, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant