Close nextReader on socket close.
Return initialized upgrades array.
Merge pull request #1 from mtsgrd/master

I like @mtsgrd's changes.