Don't call terminate_connection(myself->connection).
It doesn't do anything except give a confusing error message that we are closing the connection to ourself. Replace it with connection_del(). This also fixes a double free.
This commit is contained in:
parent
2213ecaea5
commit
f934417aa6
1 changed files with 1 additions and 2 deletions
|
@ -1154,8 +1154,7 @@ void close_network_connections(void) {
|
||||||
|
|
||||||
if(myself && myself->connection) {
|
if(myself && myself->connection) {
|
||||||
subnet_update(myself, NULL, false);
|
subnet_update(myself, NULL, false);
|
||||||
terminate_connection(myself->connection, false);
|
connection_del(myself->connection);
|
||||||
free_connection(myself->connection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < listen_sockets; i++) {
|
for(int i = 0; i < listen_sockets; i++) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue