mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-29 07:16:29 -04:00
format code
This commit is contained in:
parent
ab84639aaa
commit
09c76de65f
@ -34,9 +34,9 @@ func ReaderToChan(stream chan<- *alloc.Buffer, reader io.Reader) error {
|
||||
func ChanToWriter(writer io.Writer, stream <-chan *alloc.Buffer) error {
|
||||
for buffer := range stream {
|
||||
nBytes, err := writer.Write(buffer.Value)
|
||||
if nBytes < buffer.Len() {
|
||||
_, err = writer.Write(buffer.Value[nBytes:])
|
||||
}
|
||||
if nBytes < buffer.Len() {
|
||||
_, err = writer.Write(buffer.Value[nBytes:])
|
||||
}
|
||||
buffer.Release()
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user