Add type information to thrift_reconnecting_client state
Client: Erlang
The module only handles socket transports, which uses gen_tcp.
Fixes the build warning:
===> Compiling thrift
┌─ src/thrift_reconnecting_client.erl:
│
43 │ -record(state, {
│ ╰── Warning: record state has field(s) without type information
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
diff --git a/lib/erl/src/thrift_reconnecting_client.erl b/lib/erl/src/thrift_reconnecting_client.erl
index c9fe2aa..6e99bb8 100644
--- a/lib/erl/src/thrift_reconnecting_client.erl
+++ b/lib/erl/src/thrift_reconnecting_client.erl
@@ -41,16 +41,16 @@
]).
-record(state, {
- client = nil,
- host,
- port,
- thrift_svc,
- thrift_opts,
- reconn_min,
- reconn_max,
- reconn_time = 0,
- op_cnt_dict,
- op_time_dict
+ client = nil :: 'nil' | thrift_client:tclient(),
+ host :: inet:socket_address() | inet:hostname(),
+ port :: inet:port_number(),
+ thrift_svc :: atom(),
+ thrift_opts :: list(),
+ reconn_min :: integer(),
+ reconn_max :: integer(),
+ reconn_time = 0 :: integer(),
+ op_cnt_dict :: dict:dict(),
+ op_time_dict :: dict:dict()
}).
%%====================================================================