chronoxor / NetCoreServer

Ultra fast and low latency asynchronous socket server & client C# .NET Core library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
https://chronoxor.github.io/NetCoreServer
MIT License
2.63k stars 550 forks source link

websoket server System.IndexOutOfRangeException #265

Open liu3104009029 opened 1 year ago

liu3104009029 commented 1 year ago

websoket server at storeWSCloseStatus, when u close the networking,it will show exception: Index was outside the bounds of the array the source code from websocket.cs line 306 : WsSendBuffer.Data[offset + i] = (byte)(buffer[i] ^ WsSendMask[i % 4]); i think the reason is, at line 257: long size = storeWSCloseStatus ? (buffer.Length + 2) : buffer.Length; then the buffer.Length < size

chronoxor commented 9 months ago

Fixed in 8.0.1