aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/kernel.appup.src
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2018-10-11 16:47:50 +0200
committerRaimo Niskanen <[email protected]>2018-10-19 16:25:23 +0200
commit1292f8c229a7bf233b84660baea8ee9612515510 (patch)
tree2a3a0a6c0728b7ed338502c7d60390cf23d037b9 /lib/kernel/src/kernel.appup.src
parent377f19f25aeec6939a6728bd0c4910086c22ccdc (diff)
downloadotp-1292f8c229a7bf233b84660baea8ee9612515510.tar.gz
otp-1292f8c229a7bf233b84660baea8ee9612515510.tar.bz2
otp-1292f8c229a7bf233b84660baea8ee9612515510.zip
Fix hanging gen_tcp send vs close race
While a gen_tcp send was in progress with filled buffers and slow receiver a close (from another process) would place the port in a half dead state so the port could not signal back to send, that waited for confirmation. The solution is to after some time (5 s) of waiting for send confirmation set a monitor on the port, which detects if the port becomes half dead due to close from another process. The close pending loop has also been improved to use the linger timeout for waiting, and to set a system timeout (arbitrarily selected 3 min) to not wait forever when the other end reads data s l o w l y (tarpitting, kind of).
Diffstat (limited to 'lib/kernel/src/kernel.appup.src')
0 files changed, 0 insertions, 0 deletions