socket: allow upgrades if the socket is still in closing state

Fixes #284, courtesy of @3rd-Eden
Merge pull request #285 from lpinca/fix/gh-284

socket: allow upgrades if the socket is still in closing state (courtesy of @3rd-Eden)