mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-27 12:05:26 +00:00
Improved log messages, and case That Should Never Happen
This commit is contained in:
parent
064e448d22
commit
4be39f9b83
8
api.go
8
api.go
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user