evseevnn-zz / php-cassandra-binary

PHP library for Cassandra database via a binary protocol.
http://evseevnn.github.io/php-cassandra-binary/
MIT License
69 stars 33 forks source link

Adds connection timeout setting #41

Closed LarsFronius closed 10 years ago

LarsFronius commented 10 years ago
LarsFronius commented 10 years ago

Why was it reverted @evseevnn ?

evseevnn-zz commented 10 years ago

I do not think that the code quality is satisfactory. Also is present a strange logic to determine the number of milliseconds have passed. She at least inaccurate.

LarsFronius commented 10 years ago

To clarify why I did this: The stream timeout does not handle connect timeouts properly. I had a bunch of tests proving that. Also we got an actual error from socket_connect after some time, not an Exception that we can properly handle. So, the bit of logic seems to be the best practice work around for having this the connect timeout tweakable. The stream timeout is imho used when actual reads take too long (data transfer). I understand your further concerns and will patch.