Add `close` to the list of events that `wait` listens for