Optimizing teTserv.py make it can process connectiong error.