After the beginning of the voyage, a seaman is entitled to receive from the master, on demand, one-half of the balance of wages earned and unpaid at each port at which the vessel loads or delivers cargo during the voyage. A demand may not be made before the expiration of 5 days from the beginning of the voyage, not more than once in 5 days, and not more than once in the same port on the same entry. If a master does not comply with this subsection, the seaman is released from the agreement and is entitled to payment of all wages earned. Notwithstanding a release signed by a seaman under
section 10312 of this title, a court having jurisdiction may set aside, for good cause shown, the release and take action that justice requires. This subsection does not apply to a fishing or whaling vessel or a yacht.