Skip to content

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

Merged
1Lucas1apk merged 1 commit into
PerformanC:devfrom
cismuc:dev
Sep 26, 2026
Merged

1Lucas1apk merged 1 commit into
PerformanC:devfrom
cismuc:dev

Conversation

@cismuc

@cismuc cismuc commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

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.
  • Tested and verified locally, and in my deployment too

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
Contributor 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
@1Lucas1apk
1Lucas1apk merged commit c25c308 into PerformanC:dev Sep 26, 2026
1 of 2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants