New submission from Julien Palard:

Requesting HTTP using `requests`, which uses `http.client` which use `socket`, 
sometimes, my program get stuck like this:

```
File "/usr/lib/python3.2/socket.py", line 287 in readinto
File "/usr/lib/python3.2/http/client.py", line 308 in _read_status
File "/usr/lib/python3.2/http/client.py", line 346 in begin
File "/usr/lib/python3.2/http/client.py", line 1052 in getresponse
... in python requests ...
```

The line is the first of _read_status::

```
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
```

At a lower level, the program is stuck in a `recvfrom()` syscall.

So obviously, an error at the network level caused the server to not reply, but 
the client recvfrom() the network in a blocking socket without checking first 
if data is available, so it get stuck indefinitely :-(

----------
components: Library (Lib)
messages: 245626
nosy: Julien.Palard
priority: normal
severity: normal
status: open
title: http/client.py block indefinitely on line 308 in _read_status
versions: Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24486>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to