close socket if upgrade is received and socket.readyState != open
Merge pull request #141 from pokermania/to_learnboost_20130130

close socket if upgrade is received and socket.readyState != open