aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-11-08 10:56:33 -0500
committerNick Mathewson <nickm@torproject.org>2017-11-08 10:56:33 -0500
commit02f05f2de2654de3ab24e26ca9f1745389487d32 (patch)
treeeef6f62465c18fb8ca1c64361d831378733248e1 /src
parentc74a817e837774a5e488d6c544ea2b45d3e4ddcf (diff)
parentdcabf801e52a83e2c3cc23ccc1fa906582a927d6 (diff)
downloadtor-02f05f2de2654de3ab24e26ca9f1745389487d32.tar.gz
tor-02f05f2de2654de3ab24e26ca9f1745389487d32.zip
Merge remote-tracking branch 'dgoulet/bug23751_032_01' into maint-0.3.2
Diffstat (limited to 'src')
-rw-r--r--src/or/scheduler_kist.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/scheduler_kist.c b/src/or/scheduler_kist.c
index a3b74e8cc9..d1726ba345 100644
--- a/src/or/scheduler_kist.c
+++ b/src/or/scheduler_kist.c
@@ -598,6 +598,15 @@ kist_scheduler_run(void)
if (socket_can_write(&socket_table, chan)) {
/* flush to channel queue/outbuf */
flush_result = (int)channel_flush_some_cells(chan, 1); // 1 for num cells
+ /* XXX: While flushing cells, it is possible that the connection write
+ * fails leading to the channel to be closed which triggers a release
+ * and free its entry in the socket table. And because of a engineering
+ * design issue, the error is not propagated back so we don't get an
+ * error at this poin. So before we continue, make sure the channel is
+ * open and if not just ignore it. See #23751. */
+ if (!CHANNEL_IS_OPEN(chan)) {
+ continue;
+ }
/* flush_result has the # cells flushed */
if (flush_result > 0) {
update_socket_written(&socket_table, chan, flush_result *