aboutsummaryrefslogtreecommitdiff
path: root/src/internal/poll/sendfile_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/poll/sendfile_linux.go')
-rw-r--r--src/internal/poll/sendfile_linux.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/internal/poll/sendfile_linux.go b/src/internal/poll/sendfile_linux.go
index c2a0653294..d1c4d5c0d3 100644
--- a/src/internal/poll/sendfile_linux.go
+++ b/src/internal/poll/sendfile_linux.go
@@ -12,6 +12,9 @@ const maxSendfileSize int = 4 << 20
// SendFile wraps the sendfile system call.
func SendFile(dstFD *FD, src int, remain int64) (written int64, err error, handled bool) {
+ defer func() {
+ TestHookDidSendFile(dstFD, src, written, err, handled)
+ }()
if err := dstFD.writeLock(); err != nil {
return 0, err, false
}