From 22b50d8a4a9fde953ceb7561f6abba52fe180a83 Mon Sep 17 00:00:00 2001 From: Simon Schmidt Date: Mon, 2 Oct 2017 13:14:13 +0200 Subject: [PATCH] add req argument in error handler --- semirpc/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/semirpc/server.go b/semirpc/server.go index fd80676..75dd68d 100644 --- a/semirpc/server.go +++ b/semirpc/server.go @@ -39,7 +39,7 @@ func (s ServerError) Error() string { } type ServerHandler func(req Request,resp Response) -type ErrorHandler func(e ServerError,resp Response) +type ErrorHandler func(e ServerError,req Request,resp Response) type ServerCodec interface { Close() error @@ -101,7 +101,7 @@ func (s *serverWorkItem) handle() { s.codec.Send(s.id,s.resp) } func (s *serverWorkItem) doerror() { - s.server.Error(SE_QueueOverflow,s.resp) + s.server.Error(SE_QueueOverflow,s.req,s.resp) s.codec.Send(s.id,s.resp) }