add conn keep alive check and bug fix