mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 03:07:55 +01:00
Merge branch 'develop' of github.com:gogits/gogs into develop
This commit is contained in:
commit
f2b851388b
@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"reflect"
|
||||
"errors"
|
||||
)
|
||||
|
||||
type Packet struct {
|
||||
@ -177,6 +178,10 @@ func readBytes(reader io.Reader, buf []byte) error {
|
||||
idx := 0
|
||||
buflen := len(buf)
|
||||
|
||||
if reader == nil {
|
||||
return errors.New("reader was nil, aborting")
|
||||
}
|
||||
|
||||
for idx < buflen {
|
||||
n, err := reader.Read(buf[idx:])
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user