How can I know disconnection from server?

if it occur something client’s network error (for example, someone remove computer LAN cable or network driver error)

how can I know disconnection in client side and server side? and I want to make client access to server itself when occur network error.

I did it override gameinstance::HandleNetworkFailure_NotifyGameInstance but its not work.