mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
rpc: fix bug that caused private methods to attempt to be registered.
Fixes #1056. R=golang-dev, adg1 CC=golang-dev https://golang.org/cl/2033043
This commit is contained in:
parent
089ce17093
commit
64cb9b6f45
1 changed files with 1 additions and 1 deletions
|
|
@ -211,7 +211,7 @@ func (server *serverType) register(rcvr interface{}) os.Error {
|
||||||
method := s.typ.Method(m)
|
method := s.typ.Method(m)
|
||||||
mtype := method.Type
|
mtype := method.Type
|
||||||
mname := method.Name
|
mname := method.Name
|
||||||
if mtype.PkgPath() != "" && !isPublic(mname) {
|
if mtype.PkgPath() != "" || !isPublic(mname) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// Method needs three ins: receiver, *args, *reply.
|
// Method needs three ins: receiver, *args, *reply.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue