freedomlayer / offset

Offset payment engine
https://www.offsetcredit.org
Other
164 stars 20 forks source link

Asynchronous listener trait #302

Closed realcr closed 4 years ago

realcr commented 4 years ago

Currently the Listener trait has a synchronous listen() method. In some of our tests we start a listener, and then want to connect to the listener. Unfortunately, there is no way to know how long should we wait before we attempt to connect.

By having an asynchronous listen() we will be able to continue execution only after binding and listening has begun. This should eliminate multiple asynchronous sleep() invocations in our tests code.

realcr commented 4 years ago

Superseded by PR https://github.com/freedomlayer/offset/pull/303