Closed n0isecontrol closed 7 years ago
thank you for the bug report. it was caused by joining a non-started thread - initial value for the _thread_handle was INVALID_HANDLE_VALUE, which has the same value as "NtCurrentProcess()" macro (-1). so it was basically waiting for the process itself to end and causing deadlock.
Hey, first of all thank you for your work. I've discovered that if host is unreachable it still hangs at _mini/tor/tor_socket.cpp#L300_. I tried to just replace this line with
tor_socket::close
which can produce another loop at _/mini/tor/tor_socket.cpp#L96_.You set
tor_socket::state::ready
_here, but also check just in the next loop_ iftor_socket::_state
equalstor_socket::state::ready::closing
so it cant reachbreak;
.Call stack: -> mini-tor.exe!mini::threading::thread::join(int timeout) Line 118 -> mini-tor.exe!mini::tor::tor_socket::set_state(mini::tor::tor_socket::state new_state) Line 306 -> mini-tor.exe!mini::tor::tor_socket::connect(mini::tor::onion_router * or) Line 53 -> mini-tor.exe!tor_client::extend_to(mini::tor::onion_router * onion_router) Line 65 -> mini-tor.exe!tor_client::extend_to_random(mini::flags flags, mini::collections::list<unsigned short,mini::allocator > or_ports) Line 47
-> mini-tor.exe!main(int argc, char * * argv) Line 259
Best Regards