further fix race condition problem; call closecallback in connection's close() before cancelling its key.