Detect disconnection event on client side

Options
Hi,

When I try and turn off the Wifi i get an error telling me that it can't connect to the ip straight away, however, OnDisconnect and other delegates are called after a really long time, i need to detect if player is disconnected straight away or at least a short time after, how can I do that ?

thanks