File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -53,5 +53,14 @@ void ConnectionProviderRegistry::Register(ConnectionProviderType pt)
53
53
54
54
void ConnectionProviderRegistry::Deregister (ConnectionProviderType pt)
55
55
{
56
- registeredProviders_.erase (pt);
56
+ const auto it = registeredProviders_.find (pt);
57
+ if (it == registeredProviders_.end ())
58
+ {
59
+ return ;
60
+ }
61
+ if (it->second )
62
+ {
63
+ it->second ->shutdown ();
64
+ }
65
+ registeredProviders_.erase (it);
57
66
}
Original file line number Diff line number Diff line change @@ -1606,7 +1606,6 @@ int NETshutdown()
1606
1606
}
1607
1607
NetPlay.MOTD = nullptr ;
1608
1608
NETdeleteQueue ();
1609
- ConnectionProviderRegistry::Instance ().Get (ConnectionProviderType::TCP_DIRECT).shutdown ();
1610
1609
ConnectionProviderRegistry::Instance ().Deregister (ConnectionProviderType::TCP_DIRECT);
1611
1610
1612
1611
// Reset net usage statistics.
You can’t perform that action at this time.
0 commit comments