[ 
https://issues.apache.org/jira/browse/COUCHDB-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15435477#comment-15435477
 ] 

ASF GitHub Bot commented on COUCHDB-3102:
-----------------------------------------

GitHub user iilyak opened a pull request:

    https://github.com/apache/couchdb-config/pull/13

    handle_event expected to return {ok, State}

    Fix return value of handle_event callback.
    
    gen_event behaviour requires handle_event callback to return `{ok, State}`
    
    COUCHDB-3102

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-config fix-return-value

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-config/pull/13.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #13
    
----
commit 887dae29961d5c64c7f8cca8918e42199b33495a
Author: ILYA Khlopotov <iil...@ca.ibm.com>
Date:   2016-08-24T19:01:43Z

    handle_event expected to return {ok, State}
    
    Fix return value of handle_event callback.
    
    COUCHDB-3102

----


> The xxx_config_listener doesn't restart after a failure
> -------------------------------------------------------
>
>                 Key: COUCHDB-3102
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3102
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: ILYA
>
> The 
> [config_listener_mon|https://github.com/apache/couchdb-config/blob/master/src/config_listener_mon.erl#L44]
>  monitors the caller. 
> However in lots of places we use [following 
> pattern|https://github.com/apache/couchdb-chttpd/blob/master/src/chttpd_config_listener.erl#L45:L49]
> {code}
> handle_config_terminate(_Server, _Reason, State) ->
>     spawn(fun() ->
>         timer:sleep(5000),
>         config:listen_for_changes(?MODULE, State)
>     end).
> {code}
> In this case the spawned fun exits right after the monitor has been 
> established.
> Which means config_listener_mon would terminate. Effectively removing event 
> handler from config_event process (gen_event event manager).
> When this happen any further configuration changes get unnoticed by processes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to