Write a close frame with the given reason and schedule this
        connection close.

def _writeCloseFrame(self, reason=DISCONNECT.GO_AWAY):
        '''Write a close frame with the given reason and schedule this
        connection close.

        '''
        self.transport.writeClose(reason)
        self.transport.loseConnection()
        self.transport = None