aboutsummaryrefslogtreecommitdiff
path: root/src/internal/poll/sendfile_bsd.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/poll/sendfile_bsd.go')
-rw-r--r--src/internal/poll/sendfile_bsd.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/internal/poll/sendfile_bsd.go b/src/internal/poll/sendfile_bsd.go
index 8fcdb1c22e..669df94cc1 100644
--- a/src/internal/poll/sendfile_bsd.go
+++ b/src/internal/poll/sendfile_bsd.go
@@ -14,6 +14,9 @@ const maxSendfileSize int = 4 << 20
// SendFile wraps the sendfile system call.
func SendFile(dstFD *FD, src int, pos, 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
}