Move eventLoopGroup.syncShutdownGracefully() to an explicit shutdown call in HTTPClient to avoid this call in deinit as this is dangerous and could cause a deadlock or crash (This suggestion has come from the SwiftNIO team).
Exit criteria
Create an explicit shutdown API on HTTPClient to close the client.
Check in deinit if this shutdown API has been called otherwise log an error or fatal (determine which is appropriate)
Move
eventLoopGroup.syncShutdownGracefully()
to an explicit shutdown call in HTTPClient to avoid this call indeinit
as this is dangerous and could cause a deadlock or crash (This suggestion has come from the SwiftNIO team).Exit criteria
deinit
if this shutdown API has been called otherwise log an error or fatal (determine which is appropriate)