mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-24 22:26:29 +09:00
Improved log messages, and case That Should Never Happen
This commit is contained in:
1 parent
064e448d22
commit
4be39f9b83
1 file changed
+6
-2
@@ -227,10 +227,14 @@ func (h *Headscale) PollNetMapHandler(c *gin.Context) {
|
||||
c.Data(200, "application/json; charset=utf-8", *data)
|
||||
return
|
||||
}
|
||||
if req.OmitPeers {
|
||||
log.Printf("[%s] Client is starting up. Ready to receive the peers", m.Name)
|
||||
if req.OmitPeers && !req.Stream {
|
||||
log.Printf("[%s] Client sent endpoint update and is ok with a response without peer list", m.Name)
|
||||
c.Data(200, "application/json; charset=utf-8", *data)
|
||||
return
|
||||
} else if req.OmitPeers && req.Stream {
|
||||
log.Printf("[%s] Warning, ignoring request, don't know how to handle it", m.Name)
|
||||
c.String(http.StatusBadRequest, "")
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("[%s] Client is ready to access the tailnet", m.Name)
|
||||
|
||||
Reference in new issue
Block a user