Skip to content

Commit

Permalink
Do not log an error if socket is closed by remote endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
roehling committed Jul 15, 2023
1 parent 57795e4 commit 9ae150d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,12 @@ static void handle_socketmap_client(cfg_t* cfg, srs_t* srs,
break;
if (!request)
{
netstring_write(fp_write, "PERM Invalid query.", 19);
fflush(fp_write);
log_error("invalid socketmap query, closing connection");
if (!feof(fp_read) && !ferror(fp_read))
{
netstring_write(fp_write, "PERM Invalid query.", 19);
fflush(fp_write);
log_error("invalid socketmap query, closing connection");
}
break;
}
alarm(0);
Expand Down

0 comments on commit 9ae150d

Please sign in to comment.