Serhiy Storchaka added the comment: Try to wrap socket.makefile() with io.BufferedReader(). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue18329> _______________________________________