Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Handle write error if the client disconnects abruptly #135

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

jjnicola
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Sep 19, 2019

Codecov Report

Merging #135 into master will decrease coverage by 0.15%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
- Coverage   68.75%   68.59%   -0.16%     
==========================================
  Files          12       12              
  Lines        1741     1745       +4     
==========================================
  Hits         1197     1197              
- Misses        544      548       +4
Impacted Files Coverage Δ
ospd/server.py 28.76% <0%> (-0.82%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ccc917...317852a. Read the comment docs.

Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose BrokenPipeError is only raised for unix sockets. Shouldn't be handle more errors here?
What's happening with the connection? Is it closed too?

ospd/server.py Outdated
b_sent = self.socket.send(data[b_start:b_end])
except BrokenPipeError:
logger.error(
"Client abruptly closes the connection"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Client abruptly closes the connection"
"Client abruptly closed the connection"

@mattmundell
Copy link

Can confirm, no longer dies when the client disconnects.

@jjnicola jjnicola merged commit 8c719ca into greenbone:master Sep 23, 2019
@jjnicola jjnicola deleted the handle-write-error branch September 25, 2019 10:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants