Skip to content

fix: skip listenHttpServer when using native Bun server - #244

Open
cismuc wants to merge 1 commit into
PerformanC:devfrom
cismuc:dev
Open

cismuc wants to merge 1 commit into
PerformanC:devfrom
cismuc:dev

Conversation

@cismuc

@cismuc cismuc commented Sep 22, 2026

Copy link
Copy Markdown

Changes

  • Added a check in _startServer to skip listenHttpServer when this.usingBunServer is active.

Why

When useBunServer is enabled, createBunServer calls Bun.serve(), which automatically starts listening on the configured host and port. Calling listenHttpServer afterwards attempted to register Node-style event handlers (server.on('error', ...)) on the Bun server instance, resulting in an unhandled TypeError: server.on is not a function at startup.

Checkmarks

  • The modified endpoints have been tested.
  • Used the same indentation as the rest of the project.
  • Still compatible with LavaLink clients.

Additional information

  • Updated compiled output in dist/src/index.js.

When useBunServer is enabled, createBunServer initializes Bun.serve(), which binds and starts listening immediately. Calling listenHttpServer afterwards caused a TypeError because Bun server instances do not have an .on() method.
@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown

All Contributors have signed the CLA. The PR is now allowed to be merged.
Posted by the CLA Assistant Lite bot.

@cismuc

cismuc commented Sep 22, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

performanc-bot added a commit to PerformanC/CLA-Signatures that referenced this pull request Sep 22, 2026
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