Use var pingInterval as parameter of setInterval

Signed-off-by: Larry Tin <dev@goodow.com>