Except ProxyConnectionError on ReadThread (fix #307)

This commit is contained in:
Lonami Exo 2017-10-09 11:37:08 +02:00
parent 2a1a4508b8
commit f984aae391

View File

@ -811,7 +811,8 @@ class TelegramBareClient:
try: try:
import socks import socks
if isinstance(error, socks.GeneralProxyError): if isinstance(error, socks.GeneralProxyError) or \
isinstance(error, socks.ProxyConnectionError):
# This is a known error, and it's not related to # This is a known error, and it's not related to
# Telegram but rather to the proxy. Disconnect and # Telegram but rather to the proxy. Disconnect and
# hand it over to the main thread. # hand it over to the main thread.