allow shutdown on socket
Merge pull request #367 from FernetMenta/socket2

allow shutdown on socket