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

0.26.0 WebSocket does not fire onopen #6231

Closed
egorovsa opened this issue Oct 25, 2017 · 6 comments
Closed

0.26.0 WebSocket does not fire onopen #6231

egorovsa opened this issue Oct 25, 2017 · 6 comments

Comments

@egorovsa
Copy link

egorovsa commented Oct 25, 2017

v0.26.0 WebSocket does not work with numbers of connections more than 2.
v0.25.4 is everything ok

for instance we use simple test code

                let socket1 =  new WebSocket('wss://echo.websocket.org');
		let socket2 =  new WebSocket('wss://echo.websocket.org');
		let socket3 =  new WebSocket('wss://echo.websocket.org');
		let socket4 =  new WebSocket('wss://echo.websocket.org');

		socket1.onopen = ()=>{
			console.log('Socket 1 open');
		}

		socket1.onclose = () =>{
			console.log('Socket 1 close');
		}	

		socket2.onopen = ()=>{
			console.log('Socket 2 open');
		}

		socket2.onclose = () =>{
			console.log('Socket 2 close');
		}	

		socket3.onopen = ()=>{
			console.log('Socket 3 open');
		}

		socket3.onclose = () =>{
			console.log('Socket 3 close');
		}	

		socket4.onopen = ()=>{
			console.log('Socket 4 open');
		}

		socket4.onclose = () =>{
			console.log('Socket 4 close');
		}	

0.25.4 console.log

index.html:16 Socket 1 open
index.html:24 Socket 2 open
index.html:32 Socket 3 open
index.html:40 Socket 4 open

0.26.0 console.log only one session

index.html:16 Socket 1 open

http://prntscr.com/h1snjb 0.25.4
http://prntscr.com/h1smz0 0.26.0

@egorovsa egorovsa changed the title 0.26.0 WebSocket is not fires onopen 0.26.0 WebSocket is not fired onopen Oct 25, 2017
@egorovsa egorovsa changed the title 0.26.0 WebSocket is not fired onopen 0.26.0 WebSocket does not fire onopen Oct 25, 2017
@Christywl
Copy link
Contributor

I can reproduce this issue on Linux with nwjs-sdk-v0.26.0, but there are two sessions in my device.

Socket 1 open
Socket 1 open

@rogerwang
Copy link
Member

Thanks. Will check this after 0.26.1 release, which is scheduled today.

@rogerwang
Copy link
Member

This is because upstream ships WebSocket throttling in 62.
https://docs.google.com/document/d/1iR3XMIQukqlXb6ajIHE91apHZAxyF_wvRoB5JGeJYPs/edit#
Will disable this in NW.

@rogerwang
Copy link
Member

This is fixed in git and will be available in the next nightly build.

@rogerwang
Copy link
Member

The fix was released in 0.26.1

@egorovsa
Copy link
Author

Thank you very much for your help. Now it works great!

wanghongjuan added a commit to wanghongjuan/nw.js that referenced this issue Jan 18, 2018
- Add test for issue nwjs#6231
- This case is failed on failed version 0.26.0, pass on v0.27.4
@wanghongjuan wanghongjuan self-assigned this Jan 18, 2018
rogerwang pushed a commit that referenced this issue Feb 8, 2018
- Add test for issue #6231
- This case is failed on failed version 0.26.0, pass on v0.27.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants