After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 667989 - GSocket GSocketSource should reset timeout after triggering
GSocket GSocketSource should reset timeout after triggering
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
2.25.x
Other Linux
: Normal major
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-01-16 08:15 UTC by Sebastian Dröge (slomo)
Modified: 2012-01-16 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bug 667989 – Reset the timeout in the GSocket GSource after it was triggered (1.57 KB, patch)
2012-01-16 14:50 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2012-01-16 08:15:09 UTC
Hi,

currently the timeout for the GSocketSource is only set a single time during initialization but it isn't reset after the GSource was triggered. This makes it necessary to always create a new GSource after triggering, otherwise the timeout would happen even if the condition was met a few times since the GSource creation.

It might be necessary to add a new function to create a GSource with this behaviour because old code might rely on the old behaviour.
Comment 1 Dan Winship 2012-01-16 14:07:33 UTC
(In reply to comment #0)
> It might be necessary to add a new function to create a GSource with this
> behaviour because old code might rely on the old behaviour.

No, the old behavior is clearly incorrect.
Comment 2 Sebastian Dröge (slomo) 2012-01-16 14:34:25 UTC
Ok, will prepare a patch in a few minutes.
Comment 3 Sebastian Dröge (slomo) 2012-01-16 14:50:27 UTC
Created attachment 205373 [details] [review]
Bug 667989 – Reset the timeout in the GSocket GSource after it was triggered
Comment 4 Sebastian Dröge (slomo) 2012-01-16 17:42:40 UTC
commit d44bb6ef64bf309efa393d8c89138ba23ad6c004
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Mon Jan 16 15:49:50 2012 +0100

    GSocket: Reset the timeout in the GSocket GSource after it was triggered
    
    https://bugzilla.gnome.org/show_bug.cgi?id=667989