mirror of
https://github.com/seriyps/mtproto_proxy.git
synced 2026-08-04 07:08:10 +00:00
Merge pull request #115 from centuriononon/fix/dc-ids-range
Fix/dc ids range
This commit is contained in:
commit
421a6cc90c
2 changed files with 2 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -18,3 +18,4 @@ _build
|
|||
rebar3.crashdump
|
||||
*~
|
||||
config/prod*
|
||||
.run
|
||||
|
|
|
|||
|
|
@ -65,9 +65,7 @@ start_link(DcId) ->
|
|||
gen_server:start_link({local, dc_to_pool_name(DcId)}, ?MODULE, DcId, []).
|
||||
|
||||
valid_dc_id(DcId) ->
|
||||
is_integer(DcId) andalso
|
||||
-10 < DcId andalso
|
||||
10 > DcId.
|
||||
is_integer(DcId).
|
||||
|
||||
dc_to_pool_name(DcId) ->
|
||||
valid_dc_id(DcId) orelse error(invalid_dc_id, [DcId]),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue