Fix deadlock in ApiClient::SendMessage

fixes #6368