|
@@ -125,6 +125,9 @@ int connection_cpu_process_inbuf(connection_t *conn) {
|
|
tor_assert(conn);
|
|
tor_assert(conn);
|
|
tor_assert(conn->type == CONN_TYPE_CPUWORKER);
|
|
tor_assert(conn->type == CONN_TYPE_CPUWORKER);
|
|
|
|
|
|
|
|
+ if (!buf_datalen(conn->inbuf))
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
if (conn->state == CPUWORKER_STATE_BUSY_ONION) {
|
|
if (conn->state == CPUWORKER_STATE_BUSY_ONION) {
|
|
if (buf_datalen(conn->inbuf) < LEN_ONION_RESPONSE)
|
|
if (buf_datalen(conn->inbuf) < LEN_ONION_RESPONSE)
|
|
return 0;
|
|
return 0;
|
|
@@ -206,9 +209,9 @@ static int cpuworker_main(void *data) {
|
|
char tag[TAG_LEN];
|
|
char tag[TAG_LEN];
|
|
crypto_pk_env_t *onion_key = NULL, *last_onion_key = NULL;
|
|
crypto_pk_env_t *onion_key = NULL, *last_onion_key = NULL;
|
|
|
|
|
|
- tor_close_socket(fdarray[0]);
|
|
|
|
fd = fdarray[1];
|
|
fd = fdarray[1];
|
|
#ifndef MS_WINDOWS
|
|
#ifndef MS_WINDOWS
|
|
|
|
+ tor_close_socket(fdarray[0]);
|
|
connection_free_all();
|
|
connection_free_all();
|
|
#endif
|
|
#endif
|
|
handle_signals(0);
|
|
handle_signals(0);
|