> On Nov. 12, 2012, 10:32 p.m., Andrew Stitcher wrote: > > /proton/trunk/proton-c/include/proton/engine.h, line 288 > > <https://reviews.apache.org/r/8021/diff/1/?file=188827#file188827line288> > > > > Do you really mean prior? surely if the engine is invoked prior to the > > deadline it will decide to do nothing since no timers have expired. > > > > I think you mean "as soon after the deadline as possible"
My wording bad english, not goodly written down. ;D In practice, the driver should be invoked before that timeout, given that I/O events could be pending regardless of the timeout. Technically, if the driver is not invoked until _after_ the timeout, timers will expire and possibly lead to a connection drop (e.g. keepalive not sent in time). A more accurate comment should probably read "invoked again at least once at or before the timeout expires". > On Nov. 12, 2012, 10:32 p.m., Andrew Stitcher wrote: > > /proton/trunk/proton-c/src/driver.c, line 843 > > <https://reviews.apache.org/r/8021/diff/1/?file=188831#file188831line843> > > > > gettimeofday() is obsolete (read man 2 gettimeofday) use clock_gettime > > in preference (although this then requires -lrt, but that's not a bad thing > > in itself). Ok - the original code used "gettimeofday" in a couple of places - specifically in messenger. Seemed like that functionality was better abstracted to the driver. I'll try clock_gettime()... - Kenneth ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/8021/#review13372 ----------------------------------------------------------- On Nov. 12, 2012, 9:27 p.m., Kenneth Giusti wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/8021/ > ----------------------------------------------------------- > > (Updated Nov. 12, 2012, 9:27 p.m.) > > > Review request for qpid, Andrew Stitcher and Rafael Schloming. > > > Description > ------- > > Attached is an attempt at adding Connection idle-time-out support to > Proton-c, as defined by the AMQP 1.0 spec. > > Notes: > > 1) Allows configuration of the AMQP Connection idle timeout locally, and > support for receiving the remote's configured idle timeout. > 2) Will send periodic keepalive (empty) frames to satisfy remote's idle > requirements, if needed. > 3) Will close the connection if remote violates the locally configured idle > deadline > > > This addresses bug proton-111. > https://issues.apache.org/jira/browse/proton-111 > > > Diffs > ----- > > /proton/trunk/proton-c/bindings/python/proton.py 1408412 > /proton/trunk/proton-c/include/proton/driver.h 1408412 > /proton/trunk/proton-c/include/proton/engine.h 1408412 > /proton/trunk/proton-c/include/proton/types.h 1408412 > /proton/trunk/proton-c/src/dispatcher/dispatcher.h 1408412 > /proton/trunk/proton-c/src/dispatcher/dispatcher.c 1408412 > /proton/trunk/proton-c/src/driver.c 1408412 > /proton/trunk/proton-c/src/engine/engine-internal.h 1408412 > /proton/trunk/proton-c/src/engine/engine.c 1408412 > /proton/trunk/proton-c/src/messenger.c 1408412 > /proton/trunk/proton-c/src/util.h 1408412 > /proton/trunk/proton-c/src/util.c 1408412 > /proton/trunk/proton-j/src/main/scripts/proton.py 1408412 > /proton/trunk/tests/proton_tests/engine.py 1408412 > > Diff: https://reviews.apache.org/r/8021/diff/ > > > Testing > ------- > > Added an engine test case to verify that the timers are tracked, and the > action when timers fire, but I need to add a test at the driver level, too. > > > Thanks, > > Kenneth Giusti > >
