Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocketSubject not applying operators #1745

Closed
fingermark opened this issue Jun 6, 2016 · 3 comments
Closed

WebSocketSubject not applying operators #1745

fingermark opened this issue Jun 6, 2016 · 3 comments
Assignees
Labels
bug Confirmed bug

Comments

@fingermark
Copy link

fingermark commented Jun 6, 2016

RxJS version:
5.0.0-beta.8

Code to reproduce:

http://jsbin.com/kidawe/edit?js,console

const url = 'ws://ws.websocketstest.com:80/service';

Rx.Observable
  .webSocket({
    url: url,
    resultSelector: (e) => e.data
  })
  .map((x) => 'prefix-' + x)
  .map(x => x)
  .subscribe((x) => console.log(x));

Expected behavior:

prefix-connected,

Actual behavior:

connected,

Additional information:

I ran into an issue where I was trying to map on Observable.webSocket and noticed the maps weren't getting invoked. Others have confirmed the bug. See more here:

redux-observable/redux-observable#42

@jayphelps
Copy link
Member

jayphelps commented Jun 6, 2016

Just to clarify, if you only apply a single operator, it works. Observable.webSocket().map(x => x) but if you apply more than one, none of them get applied. Observable.webSocket().map(x => 'prefix-' + x).map(x => x). This seems to happen regardless of which operators you use.

@benlesh
Copy link
Member

benlesh commented Jun 7, 2016

Ouch... nasty. Def a result of #1701 ... :\ I did that.

@lock
Copy link

lock bot commented Jun 7, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

3 participants