{"action":"opened","issue":{"url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/958","labels_url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/958/labels{/name}","comments_url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/958/comments","events_url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/958/events","html_url":"https://github.com/Reactive-Extensions/RxJS/issues/958","id":110761480,"number":958,"title":"Strange bugs in zip","user":{"login":"blesh","id":1540597,"avatar_url":"https://avatars.githubusercontent.com/u/1540597?v=3","gravatar_id":"","url":"https://api.github.com/users/blesh","html_url":"https://github.com/blesh","followers_url":"https://api.github.com/users/blesh/followers","following_url":"https://api.github.com/users/blesh/following{/other_user}","gists_url":"https://api.github.com/users/blesh/gists{/gist_id}","starred_url":"https://api.github.com/users/blesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blesh/subscriptions","organizations_url":"https://api.github.com/users/blesh/orgs","repos_url":"https://api.github.com/users/blesh/repos","events_url":"https://api.github.com/users/blesh/events{/privacy}","received_events_url":"https://api.github.com/users/blesh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-10T02:25:39Z","updated_at":"2015-10-10T02:25:39Z","closed_at":null,"body":"While checking into your (really) impressive perf gains, it seems I've found a couple of bugs in `zip`:\r\n\r\n[Here is a jsbin demonstrating the behavior](http://jsbin.com/gehecafusi/1/edit?html,js,console,output)\r\n\r\nThe code to replicate is follows\r\n```js\r\nRx.Observable.zip(\r\n  Observable.interval(100).take(3),\r\n  Observable.interval(100).take(4),\r\n  Observable.interval(100).do(::console.log),\r\n  Observable.interval(100).do(::console.log)\r\n).subscribe(::console.log, null, () => console.log('done'));\r\n```\r\n\r\nThe resulting observable should just take 3 zipped values, then complete and unsubscribe from all underlying observables, but instead it stop emitting, doesn't complete, and the inner observables keep chugging along.\r\n\r\nWith some experimentation, I found that zipping more than 3 observables, where the last one doesn't complete, it will do this strange behavior. However if the last one *does* complete, even if one prior to it does not, it will work as expected."}}