Fix D-Bus transport on Bare
Rolling release / release (push) Successful in 5m56s

This commit is contained in:
2026-09-11 16:55:25 -04:00
parent 6c9a69af9e
commit d68ccd6ec8
+7
View File
@@ -7,6 +7,13 @@ export async function serveOnSessionBus(daemon) {
// its builtin imports use bare-* implementations where supported.
const { createRequire } = await import('node:module');
const require = createRequire(import.meta.url);
// dbus-next enables TCP_NODELAY on every transport. Bare's Unix-pipe
// transport exposes the Node-compatible method on the wrapper, but its
// underlying pipe does not implement the native socket operation. D-Bus is
// request/response traffic, so disabling this optional optimization keeps
// the transport functional without changing message semantics.
const net = require('node:net', { with: { imports: 'bare-node-runtime/imports' } });
if (net.Socket?.prototype) net.Socket.prototype.setNoDelay = function setNoDelay() { return this; };
const dbus = require('dbus-next', { with: { imports: 'bare-node-runtime/imports' } });
const { Interface } = dbus.interface;
class Session extends Interface {