Skip to content

Feature request: AbortSignal support via signal in connect TCP API #5432

@Cherry

Description

@Cherry

It would be awesome if connect() from cloudflare:sockets supported a signal for cleanup, timeouts, etc. It would make handling timeouts especially nice, like you can do with fetch:

fetch(url, {
	...,
	signal: AbortSignal.timeout(5000)
})

instead of a Promise.race or similar which is required today to effectively handle timeouts with connect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequest for Workers team to add a feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions