diff options
| author | Ayanda Dube <ayanda.dube@erlang-solutions.com> | 2015-07-15 11:05:50 +0100 |
|---|---|---|
| committer | Ayanda Dube <ayanda.dube@erlang-solutions.com> | 2015-07-15 11:05:50 +0100 |
| commit | 6b3056448154869c82b459682f7df2e2f4163f9a (patch) | |
| tree | 801e87dc0a309da3868d42d37f03263165737981 | |
| parent | 40b291242fb6aa1d4b11a08b1d5e28581a8ab3cc (diff) | |
| download | rabbitmq-server-git-6b3056448154869c82b459682f7df2e2f4163f9a.tar.gz | |
Checks if module exists
References #121
| -rw-r--r-- | src/rabbit_queue_location_validator.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rabbit_queue_location_validator.erl b/src/rabbit_queue_location_validator.erl index df2dc33140..d0dc04fbb1 100644 --- a/src/rabbit_queue_location_validator.erl +++ b/src/rabbit_queue_location_validator.erl @@ -58,7 +58,11 @@ module(Strategy) when is_binary(Strategy) -> {error, not_found} -> no_location_strategy; T -> case rabbit_registry:lookup_module(queue_master_locator, T) of - {ok, Module} -> {ok, Module}; + {ok, Module} -> + case code:which(Module) of + non_existing -> no_location_strategy; + _ -> {ok, Module} + end; _ -> no_location_strategy end end. |
