fix simult close

keep local of callbacks.on_sent