WebRTC and socket.io: Why doesn't my code reconnect a person after they disconnect?

i am trying to connect them to a random person. When I connect two people (I open two windows, accept camera, and click connect on each) it works fine, it connects them and displays the remote video.

But after a person clicks disconnect, the remote video from the other person turns into a black square, which makes sense, but the other person sees a "frozen" remote video, so not a black square.... Why is this?

Also, if I click connect on both of the windows again, it just doesn't work. No matter how many times I click connect on each window. Those two people will not get connected to anyone again, until I refresh the whole thing and go through this again. I also tried opening up another window, and clicked connect, with the hope that it would connect to the person who just disconneected and clicked connect, but it didn't.

Why can't they connect again after they go through disconnect? It seems like they can only ever connect to someone once, and then if they want to connect to another person, they have to refresh the entire page and start over.

Client code: http://hostcode.sourceforge.net/view/2918 Server code: http://hostcode.sourceforge.net/view/2919