1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 18:00:43 +00:00

correct magic number

This commit is contained in:
Darien Raymond 2018-04-02 00:00:15 +02:00
parent 3d919a6a93
commit 5af3580bcf
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -124,7 +124,7 @@ func (r *AuthenticationReader) readSize() (int32, error) {
var errSoft = newError("waiting for more data")
func (r *AuthenticationReader) readInternal(soft bool) (*buf.Buffer, error) {
if soft && r.reader.BufferedBytes() < 2 {
if soft && r.reader.BufferedBytes() < int32(r.sizeParser.SizeBytes()) {
return nil, errSoft
}