fixed error event, now passing the error object. implemented new way of disconnect, the socket is now destroyed