| 904 | } |
| 905 | |
| 906 | void |
| 907 | Http2Stream::signal_read_event(int event) |
| 908 | { |
| 909 | if (this->_sm == nullptr || this->read_vio.cont == nullptr || this->read_vio.cont->mutex == nullptr || |
| 910 | this->read_vio.op == VIO::NONE || this->terminate_stream) { |
| 911 | return; |
| 912 | } |
| 913 | |
| 914 | reentrancy_count++; |
| 915 | MUTEX_TRY_LOCK(lock, read_vio.cont->mutex, this_ethread()); |
| 916 | if (lock.is_locked()) { |
| 917 | if (read_event) { |
| 918 | read_event->cancel(); |
| 919 | read_event = nullptr; |
| 920 | } |
| 921 | _timeout.update_inactivity(); |
| 922 | this->read_vio.cont->handleEvent(event, &this->read_vio); |
| 923 | } else { |
| 924 | if (this->_read_vio_event) { |
| 925 | this->_read_vio_event->cancel(); |
| 926 | } |
| 927 | this->_read_vio_event = this_ethread()->schedule_in(this, retry_delay, event, &read_vio); |
| 928 | } |
| 929 | reentrancy_count--; |
| 930 | // Clean stream up if the terminate flag is set and we are at the bottom of the handler stack |
| 931 | terminate_if_possible(); |
| 932 | } |
| 933 | |
| 934 | void |
| 935 | Http2Stream::signal_write_event(int event, bool call_update) |
no test coverage detected