Skip to content

Conversation

@abwaters
Copy link

Summary

  • removed reuseport: true option from listen configuration which could cause port binding failures on non-windows systems
  • refactored enotsup error handling to use promise chaining instead of nested error callbacks, preventing potential unhandled promise rejections when falling back from 0.0.0.0 to 127.0.0.1 on macos sequoia

Technical Details

The previous implementation had two issues:

  1. Port binding issue: The reusePort: true option was being used on non-Windows systems, which could cause port binding failures
  2. Promise rejection handling: The ENOTSUP error handling was nested inside the tryListen promise's error handler, leading to complex promise chain management that could cause unhandled rejections

The fix:

  • Removed the problematic reusePort option entirely
  • Refactored error handling to use a cleaner promise chain with separate catch blocks for fallback logic and final error reporting

The new error handling pattern is more linear and reliable.

🤖 Generated with Claude Code

fixed two issues in server initialization:
- removed reuseport: true option from listen configuration which could cause port binding failures on non-windows systems
- refactored enotsup error handling to use promise chaining instead of nested error callbacks, preventing potential unhandled promise rejections when falling back from 0.0.0.0 to 127.0.0.1 on macos sequoia

the new error handling pattern is more linear and reliable, with separate catch blocks handling the fallback logic and final error reporting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for librechatconfigurator ready!

Name Link
🔨 Latest commit 02f3f0c
🔍 Latest deploy log https://app.netlify.com/projects/librechatconfigurator/deploys/6941a7985a8d440008fba11a
😎 Deploy Preview https://deploy-preview-4--librechatconfigurator.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 project configuration.

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.

1 participant