'Closes the connection.
Returns a `.Future` that resolves after the serving loop has exited.'

@gen.coroutine
def close(self):

    self.stream.close()
    try:
        (yield self._serving_future)
    except Exception:
        pass
