Skip to content

Commit

Permalink
Merge pull request SIPp#440 from orgads/reorder-abort
Browse files Browse the repository at this point in the history
Socket: Reorder abort operations on read/write error
  • Loading branch information
wdoekes authored Jan 12, 2021
2 parents 79b8f0d + 655d492 commit 890be3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1864,8 +1864,8 @@ int SIPpSocket::write_error(int ret)
if ((ss_transport == T_TCP || ss_transport == T_SCTP)
&& errno == EPIPE) {
nb_net_send_errors++;
abort();
sockets_pending_reset.insert(this);
abort();
if (reconnect_allowed()) {
WARNING("Broken pipe on TCP connection, remote peer "
"probably closed the socket");
Expand Down Expand Up @@ -1954,8 +1954,8 @@ int SIPpSocket::read_error(int ret)
return 0;
}

abort();
sockets_pending_reset.insert(this);
abort();

nb_net_recv_errors++;
if (reconnect_allowed()) {
Expand Down

0 comments on commit 890be3b

Please sign in to comment.