Using an `await` inside a react, feels like a code smell to me. An `await` will block the `react` block from processing other messages until the `await` returns. Which feels like it is opening up a large window of dead-locking opportunities.
Couldn't a whenever be used there instead? > On 29 Dec 2020, at 19:12, Gianni Ceccarelli <dak...@thenautilus.net> wrote: > > On 2020-12-29 David Santiago <deman...@gmail.com> wrote: >> i don't want it to exit, i want it to keep reading from the socket >> until a "200" code happens. > > Sorry, I had mis-understood the protocol. > > I've put the code on Github so it's easier to look at it > https://github.com/dakkar/raku-socket-test-from-demanuel (those > certificates are from a random apache test installation) > >> Like you said it looks like it's getting stuck in a react, but why? > > Adding a bunch of ``print``, it looks like it most commonly hangs this > way: > > * client sends ``SENDING`` > * server reads it, sends the 340 > * the client does *not* see a new line from the connection > > But, if I replace ``IO::Socket::Async::SSL`` with plain > ``IO::Socket::Async``, I can't make it hang anymore. > > I fear we've uncovered a hard-to-diagnose bug in > ``IO::Socket::Async::SSL`` … > > -- > dakkar - <Mobilis in mobile> > GPG public key fingerprint = A071 E618 DD2C 5901 9574 > 6FE2 40EA 9883 7519 3F88 > key id = 0x75193F88 >