{"action":"created","issue":{"url":"https://api.github.com/repos/Shopify/toxiproxy/issues/42","labels_url":"https://api.github.com/repos/Shopify/toxiproxy/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/toxiproxy/issues/42/comments","events_url":"https://api.github.com/repos/Shopify/toxiproxy/issues/42/events","html_url":"https://github.com/Shopify/toxiproxy/pull/42","id":65304945,"number":42,"title":"Fix toxic disabling logic and add persistent connection tests","user":{"login":"xthexder","id":1594638,"avatar_url":"https://avatars.githubusercontent.com/u/1594638?v=3","gravatar_id":"","url":"https://api.github.com/users/xthexder","html_url":"https://github.com/xthexder","followers_url":"https://api.github.com/users/xthexder/followers","following_url":"https://api.github.com/users/xthexder/following{/other_user}","gists_url":"https://api.github.com/users/xthexder/gists{/gist_id}","starred_url":"https://api.github.com/users/xthexder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xthexder/subscriptions","organizations_url":"https://api.github.com/users/xthexder/orgs","repos_url":"https://api.github.com/users/xthexder/repos","events_url":"https://api.github.com/users/xthexder/events{/privacy}","received_events_url":"https://api.github.com/users/xthexder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-30T21:21:35Z","updated_at":"2015-03-31T04:29:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Shopify/toxiproxy/pulls/42","html_url":"https://github.com/Shopify/toxiproxy/pull/42","diff_url":"https://github.com/Shopify/toxiproxy/pull/42.diff","patch_url":"https://github.com/Shopify/toxiproxy/pull/42.patch"},"body":"@eapache @Sirupsen \r\n\r\nShould fix https://github.com/Shopify/toxiproxy/issues/41 you'll need to confirm that @eapache "},"comment":{"url":"https://api.github.com/repos/Shopify/toxiproxy/issues/comments/87934220","html_url":"https://github.com/Shopify/toxiproxy/pull/42#issuecomment-87934220","issue_url":"https://api.github.com/repos/Shopify/toxiproxy/issues/42","id":87934220,"user":{"login":"xthexder","id":1594638,"avatar_url":"https://avatars.githubusercontent.com/u/1594638?v=3","gravatar_id":"","url":"https://api.github.com/users/xthexder","html_url":"https://github.com/xthexder","followers_url":"https://api.github.com/users/xthexder/followers","following_url":"https://api.github.com/users/xthexder/following{/other_user}","gists_url":"https://api.github.com/users/xthexder/gists{/gist_id}","starred_url":"https://api.github.com/users/xthexder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xthexder/subscriptions","organizations_url":"https://api.github.com/users/xthexder/orgs","repos_url":"https://api.github.com/users/xthexder/repos","events_url":"https://api.github.com/users/xthexder/events{/privacy}","received_events_url":"https://api.github.com/users/xthexder/received_events","type":"User","site_admin":false},"created_at":"2015-03-31T04:29:08Z","updated_at":"2015-03-31T04:29:08Z","body":"In the case where `toxic` is a disabled toxic, we want to interrupt the currently running toxic, and then start toxic.Pipe() on the noop toxic in its place.\r\nInstead we were calling toxic.Pipe() on the disabled toxic, which will then be in an incorrect state. (The toxic is still enabled, and the next call will not interrupt it and hang).\r\n\r\nThis never came up before because we weren't checking that existing connections persisted across toxic changes. #41 happened because a connection was opened, `/reset` was called twice, and the same connection was still open. The second `/reset` was what was hanging."}}