Handle connection refused when sending message