The slave backend would be closed twice if it would both respond with a different result and be closed due to a hangup before the master responded. Added a test case that reproduced the problem.