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

call to undefined function shotgun:wait_response/3 #134

Closed
dzimi opened this issue Dec 23, 2015 · 1 comment
Closed

call to undefined function shotgun:wait_response/3 #134

dzimi opened this issue Dec 23, 2015 · 1 comment
Labels

Comments

@dzimi
Copy link

dzimi commented Dec 23, 2015

Hi,

my code triggered a crash report caused by shotgun process after I've used a wrong server port to open the connection. The code is as fallows:

{ok, Conn} = shotgun:open(Host, Port),

%first request which returned timeout
{error,{timeout,{gen_fsm,sync_send_event,[<0.426.0>,{post,_Req},5000]}}} = shotgun:post(Conn,Url, Hrs, Body, #{timeout => 5000}),

%try to run second request on the same connection
Resp2 = shotgun:post(Conn, Url, Hrs, Body, #{timeout => 5000}),

%GOT ERROR:
gen_fsm <0.426.0> in state wait_response terminated with reason: call to undefined function shotgun:wait_response/3 from gen_fsm:handle_msg/7 line 503

Resp2 = {error,{{undef,[{shotgun,wait_response,[{post,_}},5000]}}}


 [error] [custom] CRASH REPORT Process <0.426.0> with 0 neighbours exited with reason: call to undefined function shotgun:wait_response({post,{"/123",[{<<"Content-Type">>,<<"text/xml;charset=UTF-8">>},{<<"SOAPAction">>,<<"http://www.h...">>}],...}}, {<0.380.0>,#Ref<0.0.0.906>}, #{async => false,async_mode => binary,buffer => <<>>,data => <<>>,from => {<0.380.0>,#Ref<0.0.0.869>},...}) in gen_fsm:terminate/7 line 611

I've changed my code no to run the second request, but I think that this case should be handled.
Thanks for feedback.

@jfacorro
Copy link
Contributor

@dzimi Thanks for contributing! This same issue has been reported and fixed in #96 but we haven't created a release that includes the fix yet. We will do so in the near future, in the meantime you might want to use the latest commit to the master branch. Please let us know if you have any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants