fix to set keepalive for duplicated connection