mirror of
https://github.com/tursom/TursomServer.git
synced 2024-12-28 05:40:12 +08:00
fix bug
This commit is contained in:
parent
7218441006
commit
c44e9fca3e
@ -7,7 +7,10 @@ package cn.tursom.core.buffer
|
||||
|
||||
import cn.tursom.buffer.MultipleByteBuffer
|
||||
import cn.tursom.core.buffer.impl.ArrayByteBuffer
|
||||
import java.nio.channels.*
|
||||
import java.nio.channels.GatheringByteChannel
|
||||
import java.nio.channels.ReadableByteChannel
|
||||
import java.nio.channels.ScatteringByteChannel
|
||||
import java.nio.channels.WritableByteChannel
|
||||
|
||||
|
||||
/**
|
||||
@ -99,7 +102,7 @@ fun ScatteringByteChannel.read(buffers: Array<out ByteBuffer>): Long {
|
||||
it.finishWrite(bufferArray[index])
|
||||
}
|
||||
} else {
|
||||
it.finishRead(bufferArray[index])
|
||||
it.finishWrite(bufferArray[index])
|
||||
}
|
||||
}
|
||||
index++
|
||||
|
Loading…
Reference in New Issue
Block a user