浏览代码

fix nil point error on join

abhishek9686 3 月之前
父节点
当前提交
d91cd15e5a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      auth/host_session.go

+ 1 - 1
auth/host_session.go

@@ -271,7 +271,7 @@ func CheckNetRegAndHostUpdate(networks []string, h *models.Host, relayNodeId uui
 						slog.Error("failed to relay node. maybe specified relay node is actually not a relay? Or the relayed node is not in the same network with relay?", "err", err)
 					}
 				}
-				if strings.Contains(err.Error(), "host already part of network") {
+				if err != nil && strings.Contains(err.Error(), "host already part of network") {
 					continue
 				}
 			} else {