update sockReadLine based on sgolemon's suggestion