Skip to content

devRegistryDispatcher is unconditionally closed on every config update, unlike runtimeDispatcher #13584

@petebacondarwin

Description

@petebacondarwin

At index.ts:2426, #devRegistryDispatcher is closed and recreated on every #assembleAndUpdateConfig call regardless of whether the port changed. In contrast, #runtimeDispatcher at index.ts:2410-2421 is only closed/recreated when the entry URL actually changes. This means every config update tears down and rebuilds the dev-registry connection pool unnecessarily. This is functionally correct (the fire-and-forget void ... .catch(() => {}) pattern is safe), but it's an inconsistency that could cause brief request failures during config updates if #pushRegistryUpdate happens to be in-flight when the pool is closed.

See #13515 (comment)

Metadata

Metadata

Labels

miniflareRelating to Miniflare

Type

No fields configured for Task.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions