pinterest / riffed

Provides idiomatic Elixir bindings for Apache Thrift
Apache License 2.0
308 stars 37 forks source link

Clean up client #25

Closed scohen closed 8 years ago

scohen commented 8 years ago

This fixes a bug present in the erlang thrift client since at least 0.9.3, but is fixed in the forthcoming 0.10. The client doesn't properly detect sockets that have been closed and as a result, leaks ports. Riffed would reconnect, but without cleaning up the port (which it shouldn't have to do). Since the mainline branch of riffed works with 0.9.3, I think this is a prudent fix.

@jparise @pguillory

jparise commented 8 years ago

If this code is run on 0.10 (once it becomes available), will it cause any problems? I'm wondering if this call should be based on some condition.

scohen commented 8 years ago

@jparise, no, closing an already closed client is a no-op. When we release v1.5 of riffed, I'll remove this.

jparise commented 8 years ago

Great! 👍