KeepAlive処理を修正