Added timeout for ping.