adding client.shutdown() call