propagate socket "end" event, include err in "close" event