StormHub / NetUV

.Net standard/Core binding for Libuv
Other
76 stars 20 forks source link

IndexOutOfRangeException occurred in Readbytes #50

Closed Norgerman closed 7 years ago

Norgerman commented 7 years ago

Exception detail

System.IndexOutOfRangeException occurred
  HResult=0x80131508
  Message=ReaderIndex: 826 (expected: 0 <= readerIndex <= writerIndex(413)
  Source=<Cannot evaluate the exception source>
  StackTrace:
   at NetUV.Core.Buffers.AbstractArrayBuffer`1.SetReaderIndex(Int32 readerIndex)
   at NetUV.Core.Buffers.ReadableBuffer.ReadBytes(Byte[] destination, Int32 length)
   at Shark.Internal.UvClient.OnAccept(Tcp tcp, ReadableBuffer readableBuffer) in C:\Users\XXX\Documents\Visual Studio 2017\Projects\Shark\Shark\Internal\UvClient.cs:line 103
   at NetUV.Core.Handles.Tcp.<>c__DisplayClass8_0.<OnRead>b__0(StreamHandle stream, ReadableBuffer buffer)
   at NetUV.Core.Channels.StreamConsumer`1.Consume(T stream, IStreamReadCompletion readCompletion)
doruu12 commented 7 years ago

Minor bug in updating the reader position Check this pull request

StormHub commented 7 years ago

52