throttle: actually compile.

wth did I do?

Change-Id: Ia5cb96f3e3b33e254b5a44ddb5ea351f462870e8
This commit is contained in:
Brad Fitzpatrick 2014-01-08 19:55:24 -08:00
parent 14ce902c47
commit 61cbb483f2
1 changed files with 2 additions and 2 deletions

View File

@ -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))