Skip to content

Commit

Permalink
Just use coveralls package. See coverallsapp/github-action#4
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavsingh committed Oct 13, 2019
1 parent ea0890c commit 5498a4e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
mypy --strict --ignore-missing-imports proxy.py plugin_examples.py tests.py setup.py
- name: Run Tests
run: coverage3 run --source=proxy,plugin_examples tests.py
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v1.0.1
with:
github-token: ${{ secrets.github_token }}
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: coveralls
9 changes: 5 additions & 4 deletions proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2258,9 +2258,11 @@ def handle_events(self, readables: List[Union[int, _HasFileno]], writables: List
if teardown:
return True

# Teardown if client buffer is empty and connection is inactive
if not self.client.has_buffer() and \
self.is_connection_inactive():
# Teardown if client connection has been closed or
# if client buffer is empty and connection is inactive
if self.client.closed or (
not self.client.has_buffer() and
self.is_connection_inactive()):
self.client.queue(build_http_response(
httpStatusCodes.REQUEST_TIMEOUT, reason=b'Request Timeout',
headers={
Expand All @@ -2272,7 +2274,6 @@ def handle_events(self, readables: List[Union[int, _HasFileno]], writables: List
'Client buffer is empty and maximum inactivity has reached '
'between client and server connection, tearing down...')
return True

return False

def run_once(self) -> bool:
Expand Down

0 comments on commit 5498a4e

Please sign in to comment.