Skip to content

Commit

Permalink
remove Exec error.
Browse files Browse the repository at this point in the history
  • Loading branch information
name5566 committed Dec 2, 2016
1 parent fceefb5 commit 456e169
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions chanrpc/chanrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,11 @@ func (s *Server) exec(ci *CallInfo) (err error) {
panic("bug")
}

func (s *Server) Exec(ci *CallInfo) error{
func (s *Server) Exec(ci *CallInfo) {
err := s.exec(ci)
if err != nil {
log.Error("%v", err)
}
return err
}

// goroutine safe
Expand Down
5 changes: 1 addition & 4 deletions chanrpc/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ func Example() {
wg.Done()

for {
err := s.Exec(<-s.ChanCall)
if err != nil {
fmt.Println(err)
}
s.Exec(<-s.ChanCall)
}
}()

Expand Down

0 comments on commit 456e169

Please sign in to comment.