~ubuntu-branches/ubuntu/wily/python-urllib3/wily

« back to all changes in this revision

Viewing changes to urllib3/util/connection.py

  • Committer: Package Import Robot
  • Author(s): Daniele Tricoli
  • Date: 2014-07-07 16:09:06 UTC
  • mfrom: (4.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20140707160906-hv2d4zrlg8u7rjby
Tags: 1.8.3-1
* New upstream release (Closes: #754090)
* debian/patches/01_do-not-use-embedded-python-six.patch
  - Refresh
* debian/patches/04_relax_nosetests_options.patch
  - Refresh

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
    except ImportError:  # `select` doesn't exist on AppEngine.
9
9
        select = False
10
10
 
 
11
 
11
12
def is_connection_dropped(conn):  # Platform-specific
12
13
    """
13
14
    Returns True if the connection is dropped and should be closed.
22
23
    if sock is False:  # Platform-specific: AppEngine
23
24
        return False
24
25
    if sock is None:  # Connection already closed (such as by httplib).
25
 
        return False
 
26
        return True
26
27
 
27
28
    if not poll:
28
29
        if not select:  # Platform-specific: AppEngine
40
41
        if fno == sock.fileno():
41
42
            # Either data is buffered (bad), or the connection is dropped.
42
43
            return True
43
 
 
44
 
 
45