Prior to this, closing the client's connection was done as a separate
step, outside of client.Close(). Making this the job of Client,
which already knows about its underlying connection, makes sense
considering that Client is a higher-level abstraction that includes
a connection in its internal state.
This keeps the order of the closing sequence the same as before: first
consumers/producers are closed and then the underlying client connection
is closed (deferred functions are executed in a LIFO manner).
Prior to this, closing the client's connection was done as a separate step, outside of
client.Close()
. Making this the job ofClient
, which already knows about its underlying connection, makes sense considering thatClient
is a higher-level abstraction that includes a connection in its internal state.This keeps the order of the closing sequence the same as before: first consumers/producers are closed and then the underlying client connection is closed (deferred functions are executed in a LIFO manner).
Closes #36.