mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-25 20:00:31 +08:00
A data channel send that WriteSymmetricMessage refuses with limitsExceeded returned without completing the send-gate ticket it had been handed. The ticket then became the tail every later send chains behind, so MSG, OPN and CLO for every Session on that SecureChannel stalled for good. Nothing recovered from it: the scheduler logs a send fault rather than faulting the channel, so the stall was silent. The ticket is now released on every path out. Releasing twice is safe because the ticket completes under Interlocked. MaxDataChannelBodySize approximated the chunk budget instead of computing it, and missed the cipher block rounding WriteSymmetricMessage applies: a 65535 byte send buffer under a 16 byte block loses its last 15 bytes. A body at the advertised size therefore spilled into a second chunk, which carries the Intermediate chunk type that the frame codec rejects, after the SequenceNumber had already been spent. It now mirrors that arithmetic. The audio sample wrote to a fixed name under the shared temp directory and truncated whatever was already there, so a local user could pre-create the path as a symlink and have the sample overwrite the target. It now writes into a directory created for the run and opens the file with CreateNew. Both channel fixes are covered by tests proven to fail without them. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5d026b47-265d-4c97-8715-26e207dfa03c