{"action":"created","issue":{"url":"https://api.github.com/repos/Moya/Moya/issues/722","repository_url":"https://api.github.com/repos/Moya/Moya","labels_url":"https://api.github.com/repos/Moya/Moya/issues/722/labels{/name}","comments_url":"https://api.github.com/repos/Moya/Moya/issues/722/comments","events_url":"https://api.github.com/repos/Moya/Moya/issues/722/events","html_url":"https://github.com/Moya/Moya/issues/722","id":183548100,"number":722,"title":"Eidolon goes into deadlock when requesting from network whilst offline?","user":{"login":"AndrewSB","id":3814772,"avatar_url":"https://avatars.githubusercontent.com/u/3814772?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewSB","html_url":"https://github.com/AndrewSB","followers_url":"https://api.github.com/users/AndrewSB/followers","following_url":"https://api.github.com/users/AndrewSB/following{/other_user}","gists_url":"https://api.github.com/users/AndrewSB/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewSB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewSB/subscriptions","organizations_url":"https://api.github.com/users/AndrewSB/orgs","repos_url":"https://api.github.com/users/AndrewSB/repos","events_url":"https://api.github.com/users/AndrewSB/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewSB/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-17T22:46:13Z","updated_at":"2016-10-27T03:26:24Z","closed_at":null,"body":"I noticed an interesting bug with my networking code. \r\nAll of my requests go through this observable, that I think pulled code 1:1 from https://github.com/artsy/eidolon:\r\n\r\n```swift\r\nreturn online\r\n            .ignore(false)  // Wait until we're online\r\n            .take(1)        // Take 1 to make sure we only invoke the API once.\r\n            .flatMap { _ in // Turn the online state into a network request\r\n                return actualRequest\r\n            }\r\n```\r\n\r\nThe issue I'm running in to is when the app is completely offline, my request never returns. i.e. I request `logIn`, and my UI is blocked for eternity, or until I relaunch the app. Should I be running my requests with a timeout to prevent this sort of deadlock? \r\n"},"comment":{"url":"https://api.github.com/repos/Moya/Moya/issues/comments/256537439","html_url":"https://github.com/Moya/Moya/issues/722#issuecomment-256537439","issue_url":"https://api.github.com/repos/Moya/Moya/issues/722","id":256537439,"user":{"login":"zeew","id":11990103,"avatar_url":"https://avatars.githubusercontent.com/u/11990103?v=3","gravatar_id":"","url":"https://api.github.com/users/zeew","html_url":"https://github.com/zeew","followers_url":"https://api.github.com/users/zeew/followers","following_url":"https://api.github.com/users/zeew/following{/other_user}","gists_url":"https://api.github.com/users/zeew/gists{/gist_id}","starred_url":"https://api.github.com/users/zeew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeew/subscriptions","organizations_url":"https://api.github.com/users/zeew/orgs","repos_url":"https://api.github.com/users/zeew/repos","events_url":"https://api.github.com/users/zeew/events{/privacy}","received_events_url":"https://api.github.com/users/zeew/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T03:26:24Z","updated_at":"2016-10-27T03:26:24Z","body":"`swift3`\r\n\r\n```swift\r\n\r\nfunc showErrorHUD() -> Observable<Element> {\r\n        return self.do (\r\n            onError:{ e in\r\n                \r\n                if e is Moya.Error{\r\n                    SVProgressHUD.showError(withStatus: \"\")\r\n                }\r\n                else{\r\n                    throw e\r\n                }\r\n                \r\n            }\r\n            \r\n        )\r\n    }\r\n\r\n```"}}
{"actor":{"display_login":"zeew"}}