tony2001 / pinba_extension

Pinba PHP extension
http://pinba.org
GNU Lesser General Public License v2.1
83 stars 22 forks source link

php_pinba_req_data_send uses sendto incorrectly #12

Closed a-square closed 10 years ago

a-square commented 10 years ago

php_pinba_req_data_send uses sendto in the same manner that write is used with slow devices. This is incorrect: each sendto call results in a separate datagram being sent, so if not all data fits into one datagram, several corrupted datagrams are sent instead.

If you insist on using datagrams for Pinba, you should probably check if the message size fits into one datagram and indicate an error if it doesn't.

tony2001 commented 10 years ago

Fixed, thanks for letting me know.