torpyorg / torpy

Pure python Tor client implementation
Apache License 2.0
411 stars 53 forks source link

AssertionError: Circuit must be connected first #6

Closed sinancetinkaya closed 4 years ago

sinancetinkaya commented 4 years ago
● tor.service - Tor Service
   Loaded: loaded (/storage/.config/system.d/tor.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2019-12-21 02:38:27 +03; 12h ago
 Main PID: 24613 (torpy_socks)
   Memory: 34.9M
   CGroup: /system.slice/tor.service
           └─24613 /opt/bin/python3.7 /storage/.opt/bin/torpy_socks -i 0.0.0.0 -p 9050 --hops 3

Dec 21 15:09:59 CoreELEC torpy_socks[24613]: [socks] csock close by exception
Dec 21 15:09:59 CoreELEC torpy_socks[24613]: Traceback (most recent call last):
Dec 21 15:09:59 CoreELEC torpy_socks[24613]:   File "/opt/lib/python3.7/site-packages/torpy/cli/socks.py", line 160
, in run
Dec 21 15:09:59 CoreELEC torpy_socks[24613]:     with self.create_socket(dst, port) as ssock:
Dec 21 15:09:59 CoreELEC torpy_socks[24613]:   File "/contextlib.py", line 112, in __enter__
Dec 21 15:09:59 CoreELEC torpy_socks[24613]:   File "/opt/lib/python3.7/site-packages/torpy/cli/socks.py", line 125
, in create_socket
Dec 21 15:09:59 CoreELEC torpy_socks[24613]:     with self.circuit.create_stream((dst, port)) as tor_stream:
Dec 21 15:09:59 CoreELEC torpy_socks[24613]:   File "/opt/lib/python3.7/site-packages/torpy/circuit.py", line 329,
in wrapped
Dec 21 15:09:59 CoreELEC torpy_socks[24613]:     assert self.connected, 'Circuit must be connected first'
Dec 21 15:09:59 CoreELEC torpy_socks[24613]: AssertionError: Circuit must be connected first

Proxy server was successfully used last night. Today it crashed at first connection attempt. Does it lose circuit connection when it's in idle for a while?

jbrown299 commented 4 years ago

Must be fixed since https://github.com/torpyorg/torpy/commit/c0b2b6dedf4d1456e373a2d0ed44cf4286391b9a