Commit Graph

29 Commits (patch_1)

Author SHA1 Message Date
ahxxm 5cd9f04948 Refactor (#615)
* make tcprelay.py less nested

* import traceback module at the top

* make loops in DNSResolver less nested

* make manager.py less nested

* introduce exception_handle decorator

make try/except block more clean

* apply exception_handle decorator to tcprelay

* quote condition judgement

* pep8 fix
10 years ago
clowwindy 58df1d82d0 close poll object after loop stopped 11 years ago
clowwindy 4211184886 remove unnecessary overwrite 11 years ago
clowwindy 02120e3402 optimize eventloop 11 years ago
clowwindy 111acf66c1 fix graceful restart and add unit test 11 years ago
clowwindy 4a8d0774b4 optimize performance for multiple ports
UDPRelay is broken now
11 years ago
clowwindy d774286dc0 rename utils module into shell
Since utils is ambiguous, we want to give the module a more
clear role.
12 years ago
clowwindy cb7062e1c1 implement utils.print_exception()
Previously we used logging.error(e) and traceback.print_exc()
to output error stack trace. The problem is, we want to
output the stack trace only when verbose > 0. The if statement
scattered around the code. So we replaced them with the new
utils.print_exception() call.
12 years ago
clowwindy ce805f0aea license under Apache License v2.0 12 years ago
fa08c ebfd1486d8 Removing the overhead of creating a new list per event 12 years ago
fa08c 176e97bb45 Fixing some minor issues 12 years ago
clowwindy 2a53b67c65 python 3 support; not stable yet 12 years ago
sybblow dfd4cdd758 avoid memory leak
Although fd is always the smallest number which haven't been allocated, which means memory leak is quite small. but the worst situation may consume lots of memory.
12 years ago
clowwindy 21f61c7d91 avoid removing items of the handler list while iterating over it; #179 12 years ago
clowwindy 380a646f09 handle signal soon; #179 12 years ago
clowwindy a6b8a5eef9 add some debug logs 12 years ago
clowwindy 327c70e353 Graceful shutdown; close #179 12 years ago
clowwindy 46d23bf0d4 more log 13 years ago
clowwindy 816592b674 add more log 13 years ago
clowwindy a185e1671b add some status protection 13 years ago
clowwindy 476738d273 fix errno 13 years ago
clowwindy bbad408ace rename things 13 years ago
clowwindy 0c8a8ef23f refine loop 13 years ago
clowwindy f49d086d6a add event names 13 years ago
clowwindy bacf9cb443 more work 13 years ago
clowwindy 4f46400145 add ssloop branch 13 years ago
clowwindy e6a225513e fix remove() 13 years ago
clowwindy ad4b65346c fix event loop 13 years ago
clowwindy e5149d0ed9 impl 13 years ago