Skip to content
Snippets Groups Projects
Commit 2e1e2d91 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Close sockets instead of freeing the state in the signal handler.

parent 24de57b0
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See thest
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
...@@ -68,7 +68,7 @@ static struct state *state = NULL; ...@@ -68,7 +68,7 @@ static struct state *state = NULL;
void interrupt_handler(int signal_number) { void interrupt_handler(int signal_number) {
if (state != NULL) if (state != NULL)
state_free(state); close_all_sockets(state);
die("interrupted"); die("interrupted");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment