Skip to content

Commit

Permalink
do NOT call g_source_remove twice, NEVER
Browse files Browse the repository at this point in the history
  • Loading branch information
illwieckz committed Oct 11, 2014
1 parent 54ea248 commit 4553122
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ static void stat_free_conn (struct stat_conn *conn) {
job->cons = g_slist_remove (job->cons, conn);

if (conn->fd >= 0) {
printf("free:g_source_remove: %p\n", conn->tag);
g_source_remove (conn->tag);
// conn->tag = NULL; ?
conn->tag = NULL;

close (conn->fd);
// conn->chan ?
Expand Down Expand Up @@ -921,8 +922,6 @@ static gboolean stat_servers_input_callback (GIOChannel *chan,

if (conn->buf[conn->lastnl] == '\0') {
blocked = TRUE;
g_source_remove (conn->tag);
// conn->tag = NULL; ?

parse_qstat_record (conn);

Expand Down Expand Up @@ -955,6 +954,7 @@ static gboolean stat_servers_input_callback (GIOChannel *chan,
}

if (blocked) {
printf("blocked:g_source_remove: %p\n", conn->tag);
g_source_remove (conn->tag);
// conn->tag = NULL; ?

Expand Down

0 comments on commit 4553122

Please sign in to comment.