Commit c117366b authored by Olivier Crête's avatar Olivier Crête
Browse files

pseudotcp: Unschedule source if there is no even anymore

parent 1b0efa66
......@@ -3575,8 +3575,15 @@ pseudo_tcp_source_update (PseudoTcpSocket *self,
/* Some new events set? Schedule a dispatch. Otherwise clear any scheduled
* dispatches. */
if (pseudo_tcp_source->pending_condition != prev_pending_condition) {
DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "Scheduling source %p.", pseudo_tcp_source);
if (pseudo_tcp_source->pending_condition) {
DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "Scheduling source %p.",
pseudo_tcp_source);
g_source_set_ready_time ((GSource *) pseudo_tcp_source, 0);
} else {
DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "Unscheduling source %p.",
pseudo_tcp_source);
g_source_set_ready_time ((GSource *) pseudo_tcp_source, -1);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment