Skip to content
This repository was archived by the owner on Feb 14, 2019. It is now read-only.
This repository was archived by the owner on Feb 14, 2019. It is now read-only.

Code is stripping \n #11

@adamsch1

Description

@adamsch1

Howdy - Love g2s. Was using g2s.New to pass in my own buffered io.Writer implementation so I could send multiple commands in one underlying write call. statsd was complaining and I realized eventually it was because the \n was not being sent.

Tracked it down to this line of code which is a function of dealing with larger than 64K messages:

https://github.com/peterbourgon/g2s/blob/master/g2s.go#L69

Simply getting rid of the -1 got things working. The reference implementation of statsd supports mulitple commands per packet deliminated by newline so this should get that working.

I can send a pull request if you like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions