metajack/libstrophe — pull request #34 by ghamlin (2012-11-05 20:36:00+00:00)
Title: xmpp_graceful_stop(ctx,timeout) + fix for send_queue_len

xmpp_graceful_stop(ctx,timeout) waits until either all connections have a send_queue_len of zero or timeout elapses. The primary motivation is to have an easy way to signal shutdown after any enqueued messages have been sent. The previous commit, adds a one line fix to decrement send_queue_len so it contains the length of the queue.

This works for my simple program, let me know if this looks correct to you.

Garick