mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-24 14:56:29 +03:00
Be more verbose when a peer or listener is badly formatted
This commit is contained in:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user