Removed unused imports in wsgi.server.
Added error handling in socket.shutdown.