title: gen_server not getting messages after httpc call
body: <p>I have one process which sends a pause message to a gen_server like so:</p>
  
  <pre><code>Results = [gen_server:cast(Child, pause) || 
        {Id, Child, _Type, _Modules} &lt;- supervisor:which_children(?SERVER),
        ?IGNORE(Id) == false],
  </code></pre>
  
  <p>In my gen_server, I catch these messages in my handle_cast as follows:</p>
  
  <pre><code>handle_cast(pause, #state{task=#task{server=Serv, 
                   service=Srv, 
                   description=Desc}}=State) -&gt;
      lager:info("Suspending ~s, ~s, ~s.",[Serv, Srv, Desc]),
      {noreply, State#state{suspended=true}};
  
  handle_cast(Msg, State) -&gt;
      lager:error("Url Poller received unexpected cast message: ~p",[Msg]),
      {noreply, State}.
  </code></pre>
  
  <p>What's really strange is that fairly frequently one of my gen_servers doesn't seem to receive the pause message -- I get no lager message and the process in question will not respond to subsequent attempts to pause (or resume).</p>
  
  <p>Any ideas about what might be going on? </p>
  
  <p>The gen_server is very simple, it uses erlang:send_after/3 to send itself a "poll" message. Upon receiving this poll message, if not paused, it hits a url and saves the response to an ETS and fires off another erlang:send_after/3 to poll again after an appropriate interval. If its paused, it simply fires off another erlang:send_after?3</p>
  
  <p>All pause does is set the state to paused = true</p>
  
  <p>Using observer, the stuck process shows that the current function is httpc:handle_answer and that the message queue is backing up</p>
  
  <p>Sate Tab: Information          "Timed out"
  Tip                            "system messages are probably not treated by this process"</p>
  
  <p>the top of the stack trace shows
  httpc:handle_answer httpc.erl:636</p>