moonbridge
changeset 40:46e45cd8548e
Disabling SHUT_RD due to problems with Linux
author | jbe |
---|---|
date | Sun Mar 08 00:08:22 2015 +0100 (2015-03-08) |
parents | 5e73b75bd2dc |
children | b6619de6f494 |
files | moonbridge.c |
line diff
1.1 --- a/moonbridge.c Sat Mar 07 22:38:41 2015 +0100 1.2 +++ b/moonbridge.c Sun Mar 08 00:08:22 2015 +0100 1.3 @@ -822,12 +822,17 @@ 1.4 int err = 0; /* nonzero = error occurred */ 1.5 int errno2; /* stores previous errno values that take precedence */ 1.6 if (moonbr_child_peersocket_inputstream->f) { 1.7 + /* NOTE: shutdown() with SHUT_RD shows different behavior on different 1.8 + * operating systems and particularly causes problems with Linux. Hence it 1.9 + * is disabled here. */ 1.10 + /* 1.11 if (cleanshut && moonbr_child_peersocket_type == MOONBR_SOCKETTYPE_NETWORK) { 1.12 if (shutdown(moonbr_child_peersocket_fd, SHUT_RD)) { 1.13 errno2 = errno; 1.14 err = -1; 1.15 } 1.16 } 1.17 + */ 1.18 if (fclose(moonbr_child_peersocket_inputstream->f)) { 1.19 if (!err) errno2 = errno; 1.20 err = -1;