Skip to content

Commit

Permalink
Merge pull request #4440 from esl/wpool-rdbms-probe-error
Browse files Browse the repository at this point in the history
Fix `probe_failed` error
  • Loading branch information
chrzaszcz authored Jan 30, 2025
2 parents 685eea7 + c1d03b8 commit d842d81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wpool/mongoose_wpool_rdbms.erl
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,14 @@ merge_stats_fun(send_max, V1, V2) ->
merge_stats_fun(_, V1, V2) ->
V1 + V2.

-spec inet_stats(inet:port_number() | undefined) -> [{inet:stat_option(), integer()}].
inet_stats(Port) ->
try
{ok, Stats} = inet:getstat(Port, inet_stats()),
Stats
catch C:R:S ->
?LOG_INFO(#{what => inet_stats_failed, class => C, reason => R, stacktrace => S}),
empty_inet_stats_measurements()
[]
end.

inet_stats() ->
Expand Down

0 comments on commit d842d81

Please sign in to comment.