keepalive interval should be in 1000 milliseconds
merge fix_193 back