endpoint disconnection fixes
Fix acknowledgement receipt, add test.