From 478a06cb4f40fff7427be1478c70e80b44592fb8 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Tue, 22 Jul 2025 08:27:42 +0200 Subject: [PATCH] fix: enable optimistic select by default If only one protocol is specified, send it with the first data block to skip the mss round-trip tax. --- packages/multistream-select/src/select.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/multistream-select/src/select.ts b/packages/multistream-select/src/select.ts index d877fd4a28..950c700cea 100644 --- a/packages/multistream-select/src/select.ts +++ b/packages/multistream-select/src/select.ts @@ -65,7 +65,7 @@ export interface SelectStream extends Duplex { export async function select (stream: Stream, protocols: string | string[], options: MultistreamSelectInit): Promise> { protocols = Array.isArray(protocols) ? [...protocols] : [protocols] - if (protocols.length === 1 && options.negotiateFully === false) { + if (protocols.length === 1) { return optimisticSelect(stream, protocols[0], options) }