If you say you shouldn't send ipc messages after disconnect event, that suggests that you can send ipc messages before the event. That is wrong. There is a period of time between when .disconnect() is called/.connected=false, and when the event occurs. During that period, you should not be sending ipc messages.

But, if the peer did the disconnect, or it was accidental, then you are right, this event is the first notification that your ipc channel is gone. I will add that info.