Backport: Spurious wakeup when waiting for a response is now handled properly.

Backport of https://github.com/hazelcast/hazelcast/pull/3207