[erlang-questions] Diameter service activation/deactivation timeout

Kirill Ratkin kvratkin@REDACTED
Thu Sep 10 10:40:17 CEST 2015


I have two functions listed below:

service_start(Name) ->
%% ... skipped some preparation steps for service activation
    Opts = [{'Origin-Host', atom_to_list(Name) ++ ".example.com"},
               {'Origin-Realm', "example.com"},
               {'Vendor-Id', ?VENDOR_ID},
               {'Product-Name', "Just Diameter Server"},
               {'Auth-Application-Id', Ids}] ++ Apps,

    TransportOpts =  [{transport_module, T},
                      {transport_config, [{reuseaddr, true},
                                          {ip, IP},
                                          {port, P}]}],
    diameter:start_service(Name, Opts),
    diameter:add_transport(Name, {listen, TransportOpts}),

service_stop(Name) ->
    diameter:remove_transport(Name, true),

When I do service_start the Port is listen to incoming messages.
Then I want to stop service. (there are no clients connected to service)
I do 'service_stop' and diameter:services() says '[]'. So there aren't any
active services.
But 'netstat' shows port is in LISTEN state:
tcp        0      0*               LISTEN
After about 30 seconds port is closed.

It seems 30 secs is too long ... How can I configure this timeout?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150910/7e0ea9ee/attachment.htm>

More information about the erlang-questions mailing list