Skip to content

Regression with TCP connections in 4.15.0 #9238

@Cherry

Description

@Cherry

Which Cloudflare product(s) does this pertain to?

Wrangler

What versions & operating system are you using?

wrangler 4.15.0

Please provide a link to a minimal reproduction

No response

Describe the Bug

With a test.ts like this:

import postgres from 'postgres';

export default {
    async fetch(request, env, ctx): Promise<Response> {
        const connection = postgres('postgres://reader:NWDMCE5xdipIjRrp@hh-pgsql-public.ebi.ac.uk:5432/pfmegrnargs');

        const results = await Promise.all([
            connection`SELECT 1`,
            connection`SELECT 2`,
        ]);
        ctx.waitUntil(connection.end());

        return Response.json(results);
    },
} satisfies ExportedHandler<Env>;
  • npx wrangler@4.14.4 dev test.ts, hit worker, works fine
  • npx wrangler@4.15.0 dev test.ts, hit worker, throws Incoming CONNECT on a worker not supported error

Please provide any relevant error logs

[wrangler:err] TypeError: Incoming CONNECT on a worker not supported
    at connect (cloudflare:sockets:7:20)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't working

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions