'Close a websocket connection and wait for the server side.
If we don\'t wait here, there are sometimes leak warnings in the
tests.'

@gen.coroutine
def close(self, ws):

    ws.close()
    (yield self.close_future)
