Below are the warnings that were fixed by this commit.
[git: master]Iris:ibrowse andreas$ make dialyzer
Building local plt at .dialyzer_plt
dialyzer --output_plt .dialyzer_plt --build_plt \
--apps erts kernel stdlib ssl crypto public_key asn1 compiler hipe edoc gs syntax_tools inets xmerl runtime_tools mnesia
Compiling some key modules to native code... done in 0m19.73s
Creating PLT .dialyzer_plt ... done in 1m40.98s
done (passed successfully)
dialyzer --fullpath --plt .dialyzer_plt -Wrace_conditions -Wunmatched_returns -Werror_handling -r ./ebin
Checking whether the PLT .dialyzer_plt is up-to-date... yes
Proceeding with analysis...
src/ibrowse_http_client.erl:197: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:298: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:322: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:335: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:352: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:582: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:587: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:590: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:706: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:789: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:797: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:1402: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
src/ibrowse_http_client.erl:1859: Expression produces a value of type 'ok' | integer(), but this value is unmatched
src/ibrowse_socks5.erl:25: Expression produces a value of type {'ok',<<_:16>>}, but this value is unmatched
done in 0m8.07s
done (warnings were emitted)
make: *** [dialyzer] Error 2
When a tcp_closed or ssl_closed message is handled while ibrowse is
trying to send a request to a worker, ibrowse would incorrectly return a
req_timedout message, when, in fact, the request had not even been
handled.
This patch attempts to avoid that race condition by signalling tcp or
ssl closed messages back to ibrowse differently than a normal exit.
I fixed the documentation errors in order to get them to build I made
a cursory check through the source to ensure that they were correct
and it seems like they are so I submit this patch.