Skip to content

Instantly share code, notes, and snippets.

@masaori335
Created January 28, 2020 07:24
Show Gist options
  • Save masaori335/2e118a164c275e6139a7be08d4543f6d to your computer and use it in GitHub Desktop.
Save masaori335/2e118a164c275e6139a7be08d4543f6d to your computer and use it in GitHub Desktop.
possible fix for #6313
diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc
index f3519c390..e1301cc1e 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -666,15 +666,8 @@ Http2Stream::signal_read_event(int event)
return;
}
- MUTEX_TRY_LOCK(lock, read_vio.cont->mutex, this_ethread());
- if (lock.is_locked()) {
- this->read_vio.cont->handleEvent(event, &this->read_vio);
- } else {
- if (this->_read_vio_event) {
- this->_read_vio_event->cancel();
- }
- this->_read_vio_event = this_ethread()->schedule_imm(read_vio.cont, event, &read_vio);
- }
+ SCOPED_MUTEX_LOCK(lock, read_vio.cont->mutex, this_ethread());
+ this->read_vio.cont->handleEvent(event, &this->read_vio);
}
void
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment