use close() instead of shutdown(RDWD)

See http://stackoverflow.com/questions/4160347/close-vs-shutdown-socket
Avoid warning: unused variable 'PRINT_DEBUG_INFO' [-Wunused-const-variable]
Merge pull request #301 from sam-s/master

use close instead of shutdown