In her 1966 primer, Plotting and Writing Suspense Fiction, Patricia Highsmith (The Talented Mr. Ripley) had some choice advice for what writers should do. Above all, she said:
The first person you should think of pleasing, in writing a book, is yourself. If you can amuse yourself for the length of time it takes to write a book, the publishers and the readers can and will come later.
This should probably not be taken to mean that if you hit a rough patch in your writing to immediately abandon ship. But if you have difficulty sustaining interest in your topic, it is almost certain readers will do the same.