Created by: minrk
avoids leaving client sockets open when upstream connections are rejected before the upgrade event fires.
I'm not 100% sure about the style or logic of the patch, but the added test cases and my own code suggest that it is doing the right thing. Guidance would be appreciated.
closes #624 (closed) closes #627 (closed)