-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept error already_started and make sure nksip app is running #1960
Conversation
5049.1 / Erlang 19.3 / small_tests / 12435f8 5049.5 / Erlang 19.3 / ldap_mnesia / 12435f8 5049.6 / Erlang 19.3 / elasticsearch_and_cassandra_mnesia / 12435f8 5049.2 / Erlang 19.3 / internal_mnesia / 12435f8 5049.3 / Erlang 19.3 / mysql_redis / 12435f8 5049.4 / Erlang 19.3 / odbc_mssql_mnesia / 12435f8 5049.8 / Erlang 20.0 / pgsql_mnesia / 12435f8 5049.9 / Erlang 21.0 / riak_mnesia / 12435f8 |
@@ -71,7 +82,6 @@ maybe_add_udp_max_size(NkSipOpts, Opts) -> | |||
-spec stop(ejabberd:server()) -> ok. | |||
stop(Host) -> | |||
ejabberd_hooks:delete(hooks(Host)), | |||
nksip:stop(?SERVICE), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe part of Jingle/SIP extension could be extracted into service_...
? Not stopping nksip
seems a bit like a temporary solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I removed the stop here since there may be many xmpp hosts served by MongooseIM. This service is shared between them so stopping it with first host stopped is bad idea, it's better to let it operate on stop manually if needed.
- I tried
service_
framework, I was not able to use it without modifications. Below is what I miss or makes things more difficult:- currently if I want to have a service started for a module, it needs to be explicitly added in the config file in the
services
section. This complicates modules configuration since the config is split into 2 places - the service and the module. I think it be more useful to allow configuring the service via module's options. - even I start nksip as a service, there is still no mechanism which will stop it when all modules using it are stopped.
- currently if I want to have a service started for a module, it needs to be explicitly added in the config file in the
Both items from point 2 are not very small changes, that's why I decided not to go with the service
framework. I think nksip service is perfect fit for the service
framework when it supports what's missing for me at this moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, understood, I agree it's not a big deal to let it running. Maybe some yet another alternative solution will emerge over time.
Codecov Report
@@ Coverage Diff @@
## master #1960 +/- ##
=========================================
+ Coverage 74.83% 74.9% +0.07%
=========================================
Files 312 312
Lines 28421 28425 +4
=========================================
+ Hits 21269 21292 +23
+ Misses 7152 7133 -19
Continue to review full report at Codecov.
|
According to user's report in #1946 the startup problem is fixed, so I'm merging it. Any further issues will be handled in separate PR. |
This PR makes sure that
nksip
app is started while startingmod_jingle_sip
. Also it allows to start the module for more than just one host.