Closed robertodauria closed 2 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
tcpinfox/tcpinfox_linux.go | 15 | 19 | 78.95% | ||
bbr/bbr_linux.go | 24 | 34 | 70.59% | ||
<!-- | Total: | 39 | 53 | 73.58% | --> |
Totals | |
---|---|
Change from base Build 1597: | -0.3% |
Covered Lines: | 1799 |
Relevant Lines: | 2205 |
Fd()
removes theO_NONBLOCK
flag from the descriptor before returning it.From os/file_unix.go:
When
Fd()
is called on a*os.File
obtained viaconn.File()
, this descriptor is actually a duplicate but the underlying socket is shared. The end result is that the originalconn
still thinks it has a non-blocking socket, while the socket actually became blocking. This causes things likeconn.Close()
blocking forever if no data is received.This should actually resolve #361 .
This change is