Merge branch 'avoid-crash-on-timeout' into 'develop'

avoid fatal error on client connection timeout

See merge request open-source/flexnbd-c!36
This commit is contained in:
Patrick J Cherry
2018-01-26 16:04:51 +00:00
2 changed files with 6 additions and 1 deletions

3
debian/changelog vendored
View File

@@ -1,6 +1,7 @@
flexnbd (0.1.8) UNRELEASED; urgency=medium
* Set TCP keepalive on sockets so broken connections are reaped (#33, !33)
* Set TCP keepalive on sockets so broken connections are reaped (#33, !33,
!36)
* Add a context to logs to make debugging problems easier (#34, !34)
-- James Carter <james.carter@bytemark.co.uk> Thu, 11 Jan 2018 10:05:35 +0000

View File

@@ -234,6 +234,10 @@ int client_read_request( struct client * client , struct nbd_request *out_reques
debug( "Connection reset while"
" reading request" );
return 0;
case ETIMEDOUT:
debug( "Connection timed out while"
" reading request" );
return 0;
default:
/* FIXME: I've seen this happen, but I
* couldn't reproduce it so I'm leaving