fix local/peer send event at the same moment causing deadlock bug