1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

remove unnecessary assign

This commit is contained in:
Darien Raymond 2016-11-27 21:43:20 +01:00
parent 9dd4f016b1
commit 2a37c62e07
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -92,14 +92,14 @@ func (v *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request
switch buffer[40] {
case AddrTypeIPv4:
nBytes, err = io.ReadFull(decryptor, buffer[41:45]) // 4 bytes
_, err = io.ReadFull(decryptor, buffer[41:45]) // 4 bytes
bufferLen += 4
if err != nil {
return nil, errors.New("VMess|Server: Failed to read IPv4: " + err.Error())
}
request.Address = v2net.IPAddress(buffer[41:45])
case AddrTypeIPv6:
nBytes, err = io.ReadFull(decryptor, buffer[41:57]) // 16 bytes
_, err = io.ReadFull(decryptor, buffer[41:57]) // 16 bytes
bufferLen += 16
if err != nil {
return nil, errors.New("VMess|Server: Failed to read IPv6 address: " + err.Error())
@ -114,7 +114,7 @@ func (v *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request
if domainLength == 0 {
return nil, errors.New("VMess|Server: Zero domain length.")
}
nBytes, err = io.ReadFull(decryptor, buffer[42:42+domainLength])
_, err = io.ReadFull(decryptor, buffer[42:42+domainLength])
if err != nil {
return nil, errors.New("VMess|Server: Failed to read domain: " + err.Error())
}
@ -122,7 +122,7 @@ func (v *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request
request.Address = v2net.DomainAddress(string(buffer[42 : 42+domainLength]))
}
nBytes, err = io.ReadFull(decryptor, buffer[bufferLen:bufferLen+4])
_, err = io.ReadFull(decryptor, buffer[bufferLen:bufferLen+4])
if err != nil {
return nil, errors.New("VMess|Server: Failed to read checksum: " + err.Error())
}