Added shutdown() to socket_close calls