Skip to content

Commit

Permalink
Merge pull request #12 from heroku/small_cleanup
Browse files Browse the repository at this point in the history
Small cleanup
  • Loading branch information
mcuadros committed Feb 11, 2015
2 parents b1cc05f + 06b4277 commit d715976
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rfc6587_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func TestBadSplit(t *testing.T) {
if err := scanner.Err(); err == nil {
t.Error("Expected an error, but didn't get one")
} else {
t.Log("Error: ", err)
t.Log("Error was: ", err)
}

}
5 changes: 3 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,10 @@ func rfc6587ScannerSplit(data []byte, atEOF bool) (advance int, token []byte, er
if err != nil {
return 0, nil, err
}
if len(data) >= length+i+1 {
end := length + i + 1
if len(data) >= end {
//Return the frame with the length removed
return length + i + 1, data[i+1 : length+i+1], nil
return end, data[i+1 : end], nil
}
}

Expand Down

0 comments on commit d715976

Please sign in to comment.