fix: close stream adaptive gaps and switch notify to stario v0.1.1

- make stream fast path honor adaptive soft payload limits end-to-end
  - split oversized fast-stream payloads into sequential frames before batching
  - use adaptive soft cap when encoding stream batch payloads
  - move timeout-like error detection into production code for adaptive tx
  - tune notify FrameReader read size explicitly to avoid throughput regression
  - drop local stario replace and depend on released b612.me/stario v0.1.1
This commit is contained in:
2026-04-18 16:05:57 +08:00
parent 4f760f2807
commit f038a89771
76 changed files with 12656 additions and 906 deletions
+8
View File
@@ -409,6 +409,7 @@ func (c *LogicalConn) applyAttachmentProfile(maxReadTimeout time.Duration, maxWr
state.fastStreamEncode = fastStreamEncode
state.fastBulkEncode = fastBulkEncode
state.fastPlainEncode = fastPlainEncode
state.modernPSKRuntime = nil
state.handshakeRsaKey = cloneClientConnAttachmentBytes(handshakeRsaKey)
state.secretKey = cloneClientConnAttachmentBytes(secretKey)
})
@@ -553,6 +554,12 @@ func (c *LogicalConn) runtimeSnapshot() ClientConnRuntimeSnapshot {
snapshot.HasRuntimeConn = c.transportSnapshot() != nil
snapshot.HasRuntimeStopCtx = rt.stopCtx != nil
}
if binding := c.transportBindingSnapshot(); binding != nil {
snapshot.TransportBulkAdaptiveSoftPayloadBytes = binding.bulkAdaptiveSoftPayloadBytesSnapshot()
snapshot.TransportStreamAdaptiveSoftPayloadBytes = binding.streamAdaptiveSoftPayloadBytesSnapshot()
snapshot.TransportStreamAdaptiveWaitThresholdBytes = binding.streamAdaptiveWaitThresholdBytesSnapshot()
snapshot.TransportStreamAdaptiveFlushDelay = binding.streamAdaptiveFlushDelaySnapshot()
}
if detach := c.transportDetachSnapshot(); detach != nil {
snapshot.TransportDetachReason = detach.Reason
snapshot.TransportDetachKind = classifyClientConnTransportDetachReason(detach.Reason)
@@ -816,6 +823,7 @@ func (c *LogicalConn) applyClientConnAttachmentProfile(maxReadTimeout time.Durat
state.maxWriteTimeout = maxWriteTimeout
state.msgEn = msgEn
state.msgDe = msgDe
state.modernPSKRuntime = nil
state.handshakeRsaKey = cloneClientConnAttachmentBytes(handshakeRsaKey)
state.secretKey = cloneClientConnAttachmentBytes(secretKey)
})