| 146 | | # During the handshake stage, we handle all reads internally. So |
| 147 | | # if self._handshake is True, we are always interested in read |
| 148 | | # events. If it's False, we defer to the default behaviour. |
| 149 | | # |
| 150 | | # We can't simply always return True, because then read() and |
| 151 | | # readline() may not work correctly (due to a race condition |
| 152 | | # described in IOChannel._handle_read) |
| | 146 | # During the handshake stage, we handle all reads internally (within |
| | 147 | # TLSConnection). So if self._handshake is True, we return False here |
| | 148 | # to prevent the IOChannel from responding to reads and passing data |
| | 149 | # from the TLS handshake back to the user. If it's True, we defer to |
| | 150 | # the default behaviour. |