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

Red5.getConnectionLocal returns wrong connection #39

Closed
hnobile opened this issue Dec 9, 2014 · 4 comments
Closed

Red5.getConnectionLocal returns wrong connection #39

hnobile opened this issue Dec 9, 2014 · 4 comments
Assignees
Labels

Comments

@hnobile
Copy link

hnobile commented Dec 9, 2014

I give you the scenario:

I have two connections ( clientId: 0 and clientId: 1 ), both are streaming audio and video.
I'm handling the streamBroadcastClose event to know when one of them stop broadcasting and remove the stream from my app and notify all connected users.

The strange thing is when I close the window of the clientId 1, the Red5.getConnectionLocal() method inside the event streamBroadcastClose returns the connection of the client id 0. I've checked the scope connections and both still there, so I don't know why I get the connection from the other client.

After that, if I close the client id 0 window, the Red5.getConnectionLocal() method returns the right connection, the connection of the client id 0.

I've made a video so you can watch how to reproduce or how can I reproduce this error.

Here's the link: https://dl.dropboxusercontent.com/u/4155232/Red5-geconntectionlocal.mp4

The test I've made was running the Red5 1.0.4 snapshot on a Windows 7 VM.
The clients ran outside the VM on Chrome ( 39.0.2171.71 m ) on Windows 8. My flash player version is 15.0.0.239

I've made this test on Firefox and IE too. And also I've ran opening one client on each browser, inside and outside the VM. Always, the same result.

This is the GIT link of the project I'm testing with: https://github.com/hnobile/myoflademo.git

This is a simple app built in flex to test audio and video streaming.

In the client side you need to select a streamName and then connect to the server.
Once you are connected, you can see the connection client id assigned by the Red5.

@mondain mondain self-assigned this Dec 9, 2014
@mondain mondain added the bug label Dec 9, 2014
@mondain
Copy link
Member

mondain commented Dec 13, 2014

This appears to be fixed and will be available by updating to the latest red5-server and red5-server-common jars. Here is the log from the issue39 app:

2014-12-12 23:07:30,415 [0.0.0.0-startStop-1] DEBUG ROOT - Starting up context issues
2014-12-12 23:07:57,007 [RTMPConnectionExecutor#R8QXYWTXEFCTK-1] INFO  org.red5.issues.issue39.Application - connect - client id: 0 address: 127.0.0.1:60629
2014-12-12 23:07:57,110 [RTMPConnectionExecutor#R8QXYWTXEFCTK-1] INFO  org.red5.issues.issue39.Application - streamBroadcastStart - client id: 0
2014-12-12 23:08:00,485 [RTMPConnectionExecutor#2R5WP0GEEMIQC-1] INFO  org.red5.issues.issue39.Application - connect - client id: 1 address: 127.0.0.1:60630
2014-12-12 23:08:00,580 [RTMPConnectionExecutor#2R5WP0GEEMIQC-1] INFO  org.red5.issues.issue39.Application - streamBroadcastStart - client id: 1
2014-12-12 23:08:04,018 [RTMPConnectionExecutor#NFXEHGKPIIYKX-1] INFO  org.red5.issues.issue39.Application - connect - client id: 2 address: 127.0.0.1:60631
2014-12-12 23:08:04,118 [RTMPConnectionExecutor#NFXEHGKPIIYKX-1] INFO  org.red5.issues.issue39.Application - streamBroadcastStart - client id: 2
2014-12-12 23:08:09,995 [NioProcessor-3] INFO  org.red5.issues.issue39.Application - streamBroadcastClose - client id: 1
2014-12-12 23:08:10,002 [NioProcessor-3] INFO  org.red5.issues.issue39.Application - disconnect - client id: 1 address: 127.0.0.1:60630
2014-12-12 23:08:12,298 [NioProcessor-2] INFO  org.red5.issues.issue39.Application - streamBroadcastClose - client id: 0
2014-12-12 23:08:12,298 [NioProcessor-2] INFO  org.red5.issues.issue39.Application - disconnect - client id: 0 address: 127.0.0.1:60629
2014-12-12 23:08:14,771 [NioProcessor-4] INFO  org.red5.issues.issue39.Application - streamBroadcastClose - client id: 2
2014-12-12 23:08:14,772 [NioProcessor-4] INFO  org.red5.issues.issue39.Application - disconnect - client id: 2 address: 127.0.0.1:60631

Three tabs opened and connected 0,1,2; they are then closed in this order: 1,0,2
Ill close this issue after the commits are pushed.

@mondain
Copy link
Member

mondain commented Dec 13, 2014

Issues app: https://github.com/Red5/red5-issues

@mondain
Copy link
Member

mondain commented Dec 13, 2014

Commits
server: 46d257f
common: Red5/red5-server-common@21c65a2

@mondain mondain closed this as completed Dec 13, 2014
@mondain
Copy link
Member

mondain commented Dec 16, 2014

If you'd like to help validate that this is resolved, you may test with the latest mvn repo builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants