afb-stub-ws: fix bug in reconnection