summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/adapters/gonet/gonet_test.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-04-23 17:33:50 -0700
committerShentubot <shentubot@google.com>2019-04-23 17:34:51 -0700
commit1b10f52d598e41f9ffe3a851da2da746f3d3a47a (patch)
tree6a407ba5c57230cdfba84f8b74369be89f295069 /pkg/tcpip/adapters/gonet/gonet_test.go
parentdb334f7154a1d4beedd8bd418a88c3f043ebe173 (diff)
Remember file position during Readdir()
The caller must call Readdir() at least twice to detect EOF. The old code was always restarting the directory search and then skipping elements already seen, effectively doubling the cost to read a directory. The code now remembers the last offset and doesn't reposition the cursor if next request comes at the same offset. PiperOrigin-RevId: 244957816 Change-Id: If21a8dc68b76614adbcf4301439adfda40f2643f
Diffstat (limited to 'pkg/tcpip/adapters/gonet/gonet_test.go')
0 files changed, 0 insertions, 0 deletions