Jack London knew it well: Staying aboard a boat all night offers a refuge from life onshore, even if it is tied to a dock.