mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Be more verbose when a peer or listener is badly formatted
This commit is contained in:
parent
a62e029e21
commit
846df4789a
3 changed files with 15 additions and 6 deletions
|
@ -86,7 +86,7 @@ func (l *link) reconfigure() {
|
|||
func (l *link) call(uri string, sintf string) error {
|
||||
u, err := url.Parse(uri)
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("peer %s is not correctly formatted (%s)", uri, err)
|
||||
}
|
||||
pathtokens := strings.Split(strings.Trim(u.Path, "/"), "/")
|
||||
switch u.Scheme {
|
||||
|
@ -103,7 +103,7 @@ func (l *link) call(uri string, sintf string) error {
|
|||
func (l *link) listen(uri string) error {
|
||||
u, err := url.Parse(uri)
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("listener %s is not correctly formatted (%s)", uri, err)
|
||||
}
|
||||
switch u.Scheme {
|
||||
case "tcp":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue