diff options
Diffstat (limited to 'pkg/urpc/urpc.go')
-rw-r--r-- | pkg/urpc/urpc.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/pkg/urpc/urpc.go b/pkg/urpc/urpc.go index 13b2ea314..dfd23032c 100644 --- a/pkg/urpc/urpc.go +++ b/pkg/urpc/urpc.go @@ -283,12 +283,10 @@ func (s *Server) handleOne(client *unet.Socket) error { // Client is dead. return err } + if s.afterRPCCallback != nil { + defer s.afterRPCCallback() + } - defer func() { - if s.afterRPCCallback != nil { - s.afterRPCCallback() - } - }() // Explicitly close all these files after the call. // // This is also explicitly a reference to the files after the call, |