Skip to content

Commit

Permalink
v1: avoid buffer grown.
Browse files Browse the repository at this point in the history
  • Loading branch information
navossoc committed Aug 8, 2020
1 parent f97d6d8 commit 36b3cab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (header *Header) formatVersion1() ([]byte, error) {
return []byte("PROXY UNKNOWN\r\n"), nil
}

var buf bytes.Buffer
buf := bytes.NewBuffer(make([]byte, 0, 108))
buf.Write(SIGV1)
buf.WriteString(SEPARATOR)
buf.WriteString(proto)
Expand Down

0 comments on commit 36b3cab

Please sign in to comment.