vapor / async-kit

Sugary extensions for the SwiftNIO library
MIT License
71 stars 25 forks source link

testPerformance hangs in release mode #45

Closed glbrntt closed 4 years ago

glbrntt commented 4 years ago

testPerformance never completes in release mode: a connection pool with a maximum of two connections is created but then three connections are requested and waited on:

let connA = try! pool.requestConnection().wait()
let connB = try! pool.requestConnection().wait()
let connC = try! pool.requestConnection().wait()

Either connA or connB need to be released for the connC future to be resolved.

Steps to reproduce

  1. run testPerformance in release mode

Expected behavior

testPerformance completes.

Actual behavior

testPerformance doesn't complete.

Environment

tanner0101 commented 4 years ago

Oops. Nice catch, thank you!