Fix socket write to no wait io when all data has been sent.