Fix functionality of line reader on socket

Signed-off-by: Frca <killerfrca@gmail.com>