Close socket when needed.
Fix receiving binary mixed with ascii records from mikrotik.