mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-17 23:06:30 -05:00
fix #1477
This commit is contained in:
parent
ac6c262f2e
commit
012a2d6f57
@ -26,6 +26,9 @@ type KCPPacketReader struct {
|
|||||||
|
|
||||||
func (r *KCPPacketReader) Read(b []byte) []Segment {
|
func (r *KCPPacketReader) Read(b []byte) []Segment {
|
||||||
if r.Header != nil {
|
if r.Header != nil {
|
||||||
|
if int32(len(b)) <= r.Header.Size() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
b = b[r.Header.Size():]
|
b = b[r.Header.Size():]
|
||||||
}
|
}
|
||||||
if r.Security != nil {
|
if r.Security != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user