Calling close as a callback is totally unsafe.