orca-zhang / influxdb-cpp

💜 C++ client for InfluxDB.
MIT License
163 stars 83 forks source link

Fix UDP client broken on newer versions of InfluxDB. #11

Closed jha closed 5 years ago

jha commented 5 years ago

I'm not sure if the client ever worked on older versions, but for the version I'm running, 1.7.1-1, the UDP client MUST terminate its request with a newline. Otherwise, the request will fail.

The relevant comment in the official InfluxDB source is here https://github.com/influxdata/influxdb/blob/6270a58b3f7c2fd7eb1543c5575a01c54c4e9bd1/client/v2/udp.go#L90

Looks like my editor removed trailing whitespaces on each line - apologies for the excess modifications, but the only relevant one is at L128.

orca-zhang commented 5 years ago

Hi, jha

Thanks a ton for your feedback & great PR.

jha commented 5 years ago

No problem! I found this repository on Google and it's exactly what I needed!