mirror of https://github.com/perkeep/perkeep.git
throttle: actually compile.
wth did I do? Change-Id: Ia5cb96f3e3b33e254b5a44ddb5ea351f462870e8
This commit is contained in:
parent
14ce902c47
commit
61cbb483f2
|
@ -128,8 +128,8 @@ func (c *conn) Write(p []byte) (n int, err error) {
|
|||
|
||||
func (c *conn) Read(p []byte) (n int, err error) {
|
||||
const max = 1024
|
||||
if len(p) > sz {
|
||||
p = p[:sz]
|
||||
if len(p) > max {
|
||||
p = p[:max]
|
||||
}
|
||||
n, err = c.Conn.Read(p)
|
||||
time.Sleep(c.Down.byteTime(n))
|
||||
|
|
Loading…
Reference in New Issue