We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 251e45a commit 90c9218Copy full SHA for 90c9218
input_tcp.go
@@ -117,7 +117,9 @@ func (i *TCPInput) handleConnection(conn net.Conn) {
117
118
if bytes.Equal(payloadSeparatorAsBytes[1:], line) {
119
// unread the '\n' before monkeys
120
- buffer.UnreadByte()
+ if buffer.Len() > 0 {
121
+ buffer.Truncate(buffer.Len() - 1)
122
+ }
123
var msg Message
124
msg.Meta, msg.Data = payloadMetaWithBody(buffer.Bytes())
125
i.data <- &msg
0 commit comments