I've got my iPhone sync my messages to OS X. However, even though my Mac and my iPhone are connected to my perfectly stable home network, OS X is getting messages with a few minutes of delay. All the messages are immediately available on my iPhone while OS X gets them with a huge delay, making it impossible for me to chat with someone on my Mac using Messages. This is happening occasionaly, and is happening for both regular SMS and iMessage.
I'm on latest release versions of iOS and OS X, and I've got a perfectly fine Internet connection. How can I prevent this from happening?