adding the reattach-after-timeout feature wasn't so easy after all.