Skip to content

Commit

Permalink
small additions
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeeky committed Dec 8, 2020
1 parent c33e8d4 commit c0c2cd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion proxy2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ def serve_proxy(bind, port, _ssl = False):
except OSError as e:
if 'Address already in use' in str(e):
logger.err("Could not bind to specified port as it is already in use!")
return
else:
raise

Expand Down Expand Up @@ -1151,7 +1152,7 @@ def main():
th.daemon = True
th.start()

while True:
while any(t.is_alive() for t in threads):
time.sleep(1)

except KeyboardInterrupt:
Expand Down
3 changes: 2 additions & 1 deletion proxylogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def out(txt, fd, mode='info ', **kwargs):
else:
col = ProxyLogger.colors_dict.setdefault(mode, ProxyLogger.colors_map['grey'])

tm = str(time.strftime("%H:%M:%S", time.gmtime()))
#tm = str(time.strftime("%H:%M:%S", time.gmtime()))
tm = str(time.strftime("%Y-%m-%d/%H:%M:%S", time.gmtime()))

prefix = ''
if mode:
Expand Down

0 comments on commit c0c2cd8

Please sign in to comment.