Skip to content

Commit

Permalink
add req argument in error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
maxymania committed Oct 2, 2017
1 parent 28a9c79 commit 22b50d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions semirpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 22b50d8

Please sign in to comment.