Added test to check closing on remote disconnects