• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ska-sa / aiokatcp
96%
master: 95%

Build:
Build:
LAST BUILD BRANCH: ci-macos-14
DEFAULT BRANCH: master
Repo Added 13 Nov 2017 11:08AM UTC
Files 11
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH fix-socket-send-exception
branch: fix-socket-send-exception
CHANGE BRANCH
x
Reset
  • fix-socket-send-exception
  • 0.1
  • 0.2
  • 0.3
  • 0.3.1
  • 0.3.2
  • 0.4.0
  • 0.4.1
  • 0.4.2
  • 0.4.3
  • 0.4.4
  • 0.5.0
  • 0.6.0
  • 0.6.1
  • 0.7.0
  • 0.8.0
  • 1.0.0
  • 1.1.0
  • 1.10.0
  • 1.2.0
  • 1.3.0
  • 1.3.1
  • 1.4.0
  • 1.5.0
  • 1.5.1
  • 1.6.0
  • 1.6.1
  • 1.6.2
  • 1.7.0
  • 1.8.0
  • 1.9.0
  • 2.0.0
  • 2.0.1
  • 2.0.2
  • 2.1.0
  • 2.2.0
  • NGC-1062-sensor-value-setter
  • NGC-1440-samplers-too-slow
  • NGC-1440-sensor-update-disconnect
  • NGC-1529-disconnect-handling
  • NGC-1660-sensor-watcher-filter-hypothesis
  • NGC-442-aggregate-sensors-weakref
  • abstract-types
  • add-device-status
  • add-rtd-config
  • async-timeout-fix
  • auto-strategy
  • blackify
  • broadcast-sensors
  • bulk-sampling-server
  • bulk-sensor-client
  • bump-certifi
  • bump-dependencies
  • changelog-1.9
  • ci-macos-14
  • ci-no-20.04
  • ci-py312
  • ci-update
  • client
  • close-after-remote-disconnection
  • connection-owner-protocol
  • coveralls-action
  • delay-join
  • dependabot/pip/certifi-2022.12.7
  • dependabot/pip/certifi-2023.7.22
  • dependabot/pip/certifi-2024.7.4
  • dependabot/pip/idna-3.7
  • dependabot/pip/py-1.10.0
  • dependabot/pip/requests-2.31.0
  • dependabot/pip/requests-2.32.0
  • dependabot/pip/urllib3-1.25.8
  • dependabot/pip/urllib3-2.0.6
  • dependabot/pip/urllib3-2.0.7
  • dependabot/pip/urllib3-2.2.2
  • dependabot/pip/virtualenv-20.26.6
  • deps-upgrades
  • disconnect-slow
  • doc-sensor-type-force
  • fast-byte-decode
  • faster-parse
  • faster-transform
  • fix-backoff
  • fix-handler-sig-check
  • fix-readthedocs
  • fix-rtd
  • flake8-github
  • format-bytes
  • github-actions
  • katcp-codec-release
  • link-5.1-spec
  • loop_argument_deprecation
  • master
  • misc-updates
  • mock-time-ns
  • modernise-asyncio-run
  • more-type-annotations
  • ngc-442-aggregate-sensors
  • ngc-810-sensor-description-default
  • no-implicit-optional
  • no-mid-support
  • old-mypy-workaround
  • pre-commit
  • prepare-1.0
  • prepare-1.1-release
  • prepare-1.4.0
  • prepare-1.5.0
  • prepare-1.5.1
  • prepare-1.6.0
  • prepare-1.6.2
  • prepare-1.8.0
  • prepare-2.1.0
  • prepare-2.2.0
  • py3.11.5-fix
  • py36-type-annotations
  • py37-test
  • pyproject-config
  • pytest
  • pyupgrade-3.7
  • reading-dataclass
  • remove-TCP_NODELAY
  • remove-pre-py3.5.3-support
  • remove-wheel
  • restore-darwin-support
  • restore-darwin-support-in-tests
  • restore-time-sync-on-macos
  • run-isort
  • scratch
  • sensor-proxy
  • sensor-set-add-callback
  • sensor-watcher-filter
  • sensor_reading
  • server-annotation
  • service-tasks
  • simple-aggregate-sensor
  • speedup-bulk-sampling
  • sphinx-2.1
  • status-func
  • test-3.8
  • time-sync-sensors
  • travis
  • travis-fix
  • travis-py37
  • travis-test
  • typing-get-args
  • update-ci
  • update-drain-comment
  • update-katcp-link
  • update-reqs
  • update-requirements
  • update-versions
  • use-katcp-codec-basic
  • user/johan/handle_ipv6_connection

pending completion
98

Pull #12

travis-ci

web-flow
Fix endless loop of "socket.send() raised except"

If a client is receiving async informs (e.g. sensors) and disconnects,
the server won't notice that the underlying transport has closed and
would keep attempting to send informs, with the above message being
logged each time. It seems that asyncio assumes one regularly drains the
writer (and raises the ConnectionResetError from `drain`), but there is
no good place to put that (we don't want to block the server backend if
one client is slow, although that's a whole 'nother kettle of fish).

Fixed by manually checking for a closed stream. One now gets a single
instance of
```
WARNING:aiokatcp.connection:Connection closed before message could be sent: Connection lost [127.0.0.1:54100]
```
which I think might be due to TCP socket limitations, where you can't
tell that a socket has died until you try to write to it.

Closes #11.
Pull Request #12: Fix endless loop of "socket.send() raised except"

2 of 2 new or added lines in 1 file covered. (100.0%)

2507 of 2601 relevant lines covered (96.39%)

1.93 hits per line

Relevant lines Covered
Build:
Build:
2601 RELEVANT LINES 2507 COVERED LINES
1.93 HITS PER LINE
Source Files on fix-socket-send-exception
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
98 fix-socket-send-exception Fix endless loop of "socket.send() raised except" If a client is receiving async informs (e.g. sensors) and disconnects, the server won't notice that the underlying transport has closed and would keep attempting to send informs, with the above me... Pull #12 28 Jan 2019 03:13PM UTC web-flow travis-ci pending completion  
97 fix-socket-send-exception Fix endless loop of "socket.send() raised except" If a client is receiving async informs (e.g. sensors) and disconnects, the server won't notice that the underlying transport has closed and would keep attempting to send informs, with the above me... push 28 Jan 2019 03:13PM UTC bmerry travis-ci pending completion  
See All Builds (590)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc