log error
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Evan Reichard 2025-09-22 23:09:41 -04:00
parent 2e73689762
commit 4ab6f166b0

View File

@ -93,19 +93,26 @@ func (s *Server) getInfo(w http.ResponseWriter, _ *http.Request) {
}
s.mu.RUnlock()
fmt.Println(1)
// Create Response
d, err := json.MarshalIndent(InfoResponse{
Tunnels: allTunnels,
Version: config.GetVersion(),
}, "", " ")
if err != nil {
fmt.Println(4)
log.WithError(err).Error("failed to marshal info")
w.WriteHeader(http.StatusInternalServerError)
return
}
fmt.Println(2, string(d))
// Send Response
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write(d)
fmt.Println(3)
}
func (s *Server) handleRawConnection(conn net.Conn) {