MagicStack / MagicStack/uvloop
SSL connection error while debug is enabled
@fantix đang làm issue này rồi.
Từ ngày 27/10/2021.
- Ngôn ngữ chính
- Cython
- Star
- 11.9k
- Fork
- 616
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
* **uvloop version**: 0.15.2
* **Python version**: 3.7.3
* **Platform**: Debian GNU/Linux 10
* **Can you reproduce the bug with `PYTHONASYNCIODEBUG` in env?**: yes
* **Does uvloop behave differently from vanilla asyncio? How?**: yes, error in uvloop code
Sometimes when asyncio debug enabled (and connection is closed before starting SSL handshake? ) I got the error:
```
protocol:
transport:
Traceback (most recent call last):
File "uvloop/handles/stream.pyx", line 987, in uvloop.loop.__uv_stream_buffered_on_read
File "uvloop/loop.pyx", line 107, in uvloop.loop.run_in_context1
File "uvloop/sslproto.pyx", line 379, in uvloop.loop.SSLProtocol.buffer_updated
File "uvloop/sslproto.pyx", line 505, in uvloop.loop.SSLProtocol._do_handshake
File "uvloop/sslproto.pyx", line 531, in uvloop.loop.SSLProtocol._on_handshake_complete
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
```
Looks like you should check if handshake is started before getting _handshake_start_time sslproto.pyx:
```
if self._loop.get_debug():
dt = self._loop.time() - self._handshake_start_time
aio_logger.debug("%r: SSL handshake took %.1f ms", self, dt * 1e3)
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.