{"action":"closed","issue":{"url":"https://api.github.com/repos/VividCortex/siesta/issues/47","labels_url":"https://api.github.com/repos/VividCortex/siesta/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/VividCortex/siesta/issues/47/comments","events_url":"https://api.github.com/repos/VividCortex/siesta/issues/47/events","html_url":"https://github.com/VividCortex/siesta/issues/47","id":86585236,"number":47,"title":"\"Post\" chain handler behavior unclear with quit()","user":{"login":"PreetamJinka","id":379404,"avatar_url":"https://avatars.githubusercontent.com/u/379404?v=3","gravatar_id":"","url":"https://api.github.com/users/PreetamJinka","html_url":"https://github.com/PreetamJinka","followers_url":"https://api.github.com/users/PreetamJinka/followers","following_url":"https://api.github.com/users/PreetamJinka/following{/other_user}","gists_url":"https://api.github.com/users/PreetamJinka/gists{/gist_id}","starred_url":"https://api.github.com/users/PreetamJinka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PreetamJinka/subscriptions","organizations_url":"https://api.github.com/users/PreetamJinka/orgs","repos_url":"https://api.github.com/users/PreetamJinka/repos","events_url":"https://api.github.com/users/PreetamJinka/events{/privacy}","received_events_url":"https://api.github.com/users/PreetamJinka/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-09T12:37:46Z","updated_at":"2015-06-09T12:47:22Z","closed_at":"2015-06-09T12:47:22Z","body":"The docs say...\r\n> The \"post\" chain runs after the main handler, whether it is skipped or not. The first handler in the \"post\" chain is guaranteed to run, but execution may quit anywhere else in the chain.\r\n> —https://godoc.org/github.com/VividCortex/siesta#Service\r\n\r\nI'm not sure why we only guarantee that the first one always runs. Right now, you can call the `quit()` function in the \"pre\" chain and only have the first handler of the \"post\" chain run. That seems odd to me, and it makes the application logic a bit weird too.\r\n\r\nI think we should set `quit` to be false before [this](https://github.com/VividCortex/siesta/blob/f504c5c08c4f8758d4ed24cf94d93fc5b10840ba/service.go#L133-L141) loop so that we can still guarantee that the first handler runs, but the user has more flexibility about the rest of the chain."}}