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.
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