don't count connections and disconnections to ourself as sign of failure in tests
This commit is contained in:
parent
51f77cc0a1
commit
1b79ce86e1
|
@ -58,7 +58,8 @@ int peer_disconnects = 0;
|
|||
|
||||
bool on_alert(alert const* a)
|
||||
{
|
||||
if (alert_cast<peer_disconnected_alert>(a))
|
||||
auto const* const pd = alert_cast<peer_disconnected_alert>(a);
|
||||
if (pd && pd->error != make_error_code(errors::self_connection))
|
||||
++peer_disconnects;
|
||||
else if (alert_cast<peer_error_alert>(a))
|
||||
++peer_disconnects;
|
||||
|
|
|
@ -59,7 +59,8 @@ int peer_disconnects = 0;
|
|||
|
||||
bool on_alert(alert const* a)
|
||||
{
|
||||
if (alert_cast<peer_disconnected_alert>(a))
|
||||
auto const* const pd = alert_cast<peer_disconnected_alert>(a);
|
||||
if (pd && pd->error != make_error_code(errors::self_connection))
|
||||
++peer_disconnects;
|
||||
else if (alert_cast<peer_error_alert>(a))
|
||||
++peer_disconnects;
|
||||
|
|
Loading…
Reference in New Issue