fixing disconnect delay when using polling