Files
bun.sh/test/js/node
Claude Bot c184b079bb Add getConnections() method to http.Server and track connection count
This fixes an issue where code-server and other Express applications
fail with "app.server.getConnections is not a function" when trying
to query active connection counts.

Changes:
- Added _connections counter to http.Server constructor
- Increment _connections when a new socket connection is established
- Decrement _connections when a socket closes
- Added getConnections() method to http.Server prototype that
  matches Node.js behavior

The implementation follows the same pattern as net.Server's
getConnections() method, calling the callback with (null, count)
where count is 0 if the server is closed.

Fixes issue with running code-server on Bun where the application
would fail when checking active connections.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 23:23:51 +00:00
..
2025-08-27 06:39:11 -07:00
2025-09-27 00:27:23 -07:00
2025-10-20 18:01:25 -07:00
2025-09-11 17:53:06 -07:00
2025-10-09 19:11:08 -07:00