Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve error messages when connect failed #19

Merged
merged 4 commits into from
Sep 28, 2022
Merged

Conversation

terry-xiaoyu
Copy link

@terry-xiaoyu terry-xiaoyu commented Sep 28, 2022

before:

(emqx@127.0.0.1)10> rp(sys:get_status(hd(L))).
{status,<0.2926.0>,
        {module,gen_server},
        [[{'$ancestors',[<0.2925.0>,<0.2924.0>,'172.100.239.2#7000',
                         eredis_cluster_pool,eredis_cluster_sup,<0.2623.0>]},
          {options,[]},
          {transport,gen_tcp},
          {'$initial_call',{eredis_client,init,1}}],
         running,<0.2925.0>,[],
         [{header,"Status for generic server <0.2926.0>"},
          {data,[{"Status",running},
                 {"Parent",<0.2925.0>},
                 {"Logged events",[]}]},
          {data,[{"State",
                  #state{host = "172.100.239.2",port = 7000,
                         password = <<"public">>,database = <<"0">>,
                         sentinel = undefined,reconnect_sleep = no_reconnect,
                         connect_timeout = 5000,socket = #Port<0.80>,
                         parser_state = #pstate{state = undefined,
                                                continuation_data = undefined},
                         queue = {[],[]}}}]}]]}
ok

after

(emqx@127.0.0.1)11> rp(sys:get_status(hd(L))).
{status,<0.2926.0>,
        {module,gen_server},
        [[{'$ancestors',[<0.2925.0>,<0.2924.0>,'172.100.239.2#7000',
                         eredis_cluster_pool,eredis_cluster_sup,<0.2623.0>]},
          {options,[]},
          {transport,gen_tcp},
          {'$initial_call',{eredis_client,init,1}}],
         running,<0.2925.0>,[],
         [{header,"Status for generic server <0.2926.0>"},
          {data,[{"Status",running},
                 {"Parent",<0.2925.0>},
                 {"Logged events",[]}]},
          {data,[{"State",
                  #state{host = "172.100.239.2",port = 7000,
                         password = "******",database = <<"0">>,sentinel = undefined,
                         reconnect_sleep = no_reconnect,connect_timeout = 5000,
                         socket = #Port<0.80>,
                         parser_state = #pstate{state = undefined,
                                                continuation_data = undefined},
                         queue = {[],[]}}}]}]]}

@terry-xiaoyu terry-xiaoyu self-assigned this Sep 28, 2022
src/eredis.appup.src Outdated Show resolved Hide resolved
@zmstone zmstone merged commit b8b13f7 into master Sep 28, 2022
@zmstone zmstone deleted the improve_error_msg branch September 28, 2022 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants