File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -92,11 +92,13 @@ Http2Stream::main_event_handler(int event, void *edata)
9292 inactive_timeout_at = Thread::get_hrtime () + inactive_timeout;
9393 if (e->cookie == &write_vio) {
9494 if (write_vio.mutex ) {
95- MUTEX_TRY_LOCK (lock, write_vio.mutex , this_ethread ());
96- if (lock.is_locked () && write_vio.cont && this ->current_reader ) {
97- write_vio.cont ->handleEvent (event, &write_vio);
98- } else {
99- this_ethread ()->schedule_imm (write_vio.cont , event, &write_vio);
95+ if (write_vio.cont && this ->current_reader ) {
96+ MUTEX_TRY_LOCK (lock, write_vio.mutex , this_ethread ());
97+ if (lock.is_locked ()) {
98+ write_vio.cont ->handleEvent (event, &write_vio);
99+ } else {
100+ this_ethread ()->schedule_imm (write_vio.cont , event, &write_vio);
101+ }
100102 }
101103 }
102104 } else {
You can’t perform that action at this time.
0 commit comments