Skip to content

Commit

Permalink
Improving status resilence
Browse files Browse the repository at this point in the history
  • Loading branch information
daonb committed Jun 19, 2024
1 parent 9072a9e commit e52a20e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sock.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,9 @@ func (s *sockServer) handleStatus(w http.ResponseWriter, r *http.Request) {
for _, peer := range peers.Peers {
var cp peers.CandidatePairStats
err := peer.GetCandidatePair(&cp)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
if err == nil {
ret.Peers = append(ret.Peers, cp)
}
ret.Peers = append(ret.Peers, cp)
}
b, err := json.Marshal(ret)
if err != nil {
Expand Down

0 comments on commit e52a20e

Please sign in to comment.