mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
37341af2d1
The metadata parser unconditionally assigned GetInt results (which return 0 for missing keys) to all KCP config fields, overwriting defaults like SndWnd=1024, RcvWnd=1024, StreamBuf=2097152 with 0. KCP's WndSize only applies positive values, so snd_wnd=0 caused the write path condition waitsnd < s.kcp.snd_wnd to never succeed, effectively stalling throughput at ~10Mbps instead of 400Mbps+. - Only apply metadata values when the key actually exists (IsExists check) - Use Clone() instead of sharing the global DefaultConfig pointer - Add Config.Clone() deep-copy method