wasClean

The wasClean read-only property of the CloseEvent interface returns true if the connection closed cleanly.

MDN Reference