Update error name to ErrClientNotFound
This commit is contained in:
parent
5ddfd911ba
commit
b01c8e06e0
@ -29,8 +29,8 @@ var (
|
|||||||
DefaultLink = "network"
|
DefaultLink = "network"
|
||||||
// ErrMsgUnknown is returned when unknown message is attempted to send or receive
|
// ErrMsgUnknown is returned when unknown message is attempted to send or receive
|
||||||
ErrMsgUnknown = errors.New("unknown message")
|
ErrMsgUnknown = errors.New("unknown message")
|
||||||
// ErrChannelUnknown is returned when attempting to send or received on unknown channel
|
// ErrClientNotFound is returned when client for tunnel channel could not be found
|
||||||
ErrChannelUnknown = errors.New("unknown channel")
|
ErrClientNotFound = errors.New("client not found")
|
||||||
)
|
)
|
||||||
|
|
||||||
// node is network node
|
// node is network node
|
||||||
@ -462,7 +462,7 @@ func (n *network) sendMsg(msgType string, channel string) error {
|
|||||||
client, ok := n.tunClient[channel]
|
client, ok := n.tunClient[channel]
|
||||||
if !ok {
|
if !ok {
|
||||||
n.RUnlock()
|
n.RUnlock()
|
||||||
return ErrChannelUnknown
|
return ErrClientNotFound
|
||||||
}
|
}
|
||||||
n.RUnlock()
|
n.RUnlock()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user