This commit is contained in:
xtaci
2016-09-06 16:23:36 +08:00
parent 80ac1aabb4
commit f78c3064f7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ func TestSpeed(t *testing.T) {
}
println("total recv:", nrecv)
stream.Close()
fmt.Println("time for 16MB rtt", time.Now().Sub(start))
fmt.Println("time for 16MB rtt", time.Since(start))
wg.Done()
}()
msg := make([]byte, 8192)
+1 -1
View File
@@ -125,7 +125,7 @@ func (s *Stream) recycleTokens() (n int) {
// split large byte buffer into smaller frames, reference only
func (s *Stream) split(bts []byte, cmd byte, sid uint32) []Frame {
var frames []Frame
for len(bts) > int(s.frameSize) {
for len(bts) > s.frameSize {
frame := newFrame(cmd, sid)
frame.data = bts[:s.frameSize]
bts = bts[s.frameSize:]