basho / riak-erlang-client

The Riak client for Erlang.
Apache License 2.0
312 stars 188 forks source link

Is it necessary to force a disconnect after a client side imposed timeout? #95

Open dreverri opened 11 years ago

dreverri commented 11 years ago

Currently when riakc_pb_socket receives req_timeout for the active request the client forces a disconnect: https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L861 https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L869

If the timed out request is not the active request a disconnect won't be forced. Is there a reason a disconnect must be forced in this scenario?

seancribbs commented 11 years ago

I suspect it is that the socket may eventually receive the response, but there's no way to cancel an existing request, so the client must disconnect. It seems wise to remove the client-side timeouts in this case reconsider the structure.