diff options
author | Viktor Söderqvist <[email protected]> | 2020-10-19 13:12:04 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-10-20 11:02:03 +0200 |
commit | 69f19635df64ea48af3120c9685f7ad51b338f8f (patch) | |
tree | 164761e272c46c564e64a76e5df1704c48c8318b /README.asciidoc | |
parent | 3047f0a5ef1872a1d8533c90bccb434d575d98f0 (diff) | |
download | gun-69f19635df64ea48af3120c9685f7ad51b338f8f.tar.gz gun-69f19635df64ea48af3120c9685f7ad51b338f8f.tar.bz2 gun-69f19635df64ea48af3120c9685f7ad51b338f8f.zip |
Disconnect when setopts returns an error
There is a race condition: After receiving data, before setting the
socket back to {active, once}, the server may have closed the socket
or an error may have occurred. Since the socket was in passive mode,
no message is received. Handling the return value of setopts solves
the issue.
Amended by Loïc Hoguin to handle the return value from the active/1
function call.
Diffstat (limited to 'README.asciidoc')
0 files changed, 0 insertions, 0 deletions