Override SocketServer.StreamRequestHandler finish() method due to this bug http://bugs.python.org/issue14574