[Bug 35548] New: Porter: _close_async() should take a timeout, and _force_close_async() should not be API

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Mar 22 16:48:52 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=35548

           Summary: Porter: _close_async() should take a timeout, and
                    _force_close_async() should not be API
           Product: Wocky
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: General
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: will.thompson at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org


It's silly that applications which call _close_async() cannot rely on it ever
completing, and so have to mess around adding their own arbitrary timeout and
then calling _force_close_async() and then when their callback for
_close_async() is called they have to check whether the reason it failed was
because it was forcibly closed (by them!) and if so treat the error as not an
error.

I think _close_async() should take a timeout, with a sensible default and a way
to say “RIGHT NOW DON'T WAIT”. _close_finish() should return a flag for whether
the connection was closed cleanly. In fact, the only reason _close_async()
should fail is if the porter is already closed when you call it, as I see it.
(And arguably then it should just succeed.)

This would dramatically simplify the code in Gabble and Salut which closes up
porters, at the cost of slightly complicating the porter implementation, but I
think it would be easier to implement within the porter than without.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list