Adding a mutex in sendMessage of BaseConnection