• Jason Yellick's avatar
    op-node: RPC Limit client does not respect context · a77ef6dc
    Jason Yellick authored
    This change addresses two bugs.
    
    1. The existing limit.go implements its own semaphore which ignores the
       passed in context.  This means that the semaphore will block
       indefinitely, even when the context of the request has already
       expired.
    
    2. The existing implementation does not guard against clients which
       invoke RPC methods after the channel underlying the custom semaphore
       has been closed.  This results in panics where the closed channel is
       written to during shutdown, and results in test flakiness.  This
       flakiness is most evident in the op-e2e-http-tests suite.
    
    Along with these fixes comes a test which attempts to demonstrate the
    previous bad behavior.  Because these bugs are inherently tied to the
    interaction of multiple go routines, the test ends up being a bit
    complex, but is well commented and hopefully remains readable.
    a77ef6dc
Name
Last commit
Last update
..
chaincfg Loading commit data...
client Loading commit data...
cmd Loading commit data...
flags Loading commit data...
heartbeat Loading commit data...
metrics Loading commit data...
node Loading commit data...
p2p Loading commit data...
rollup Loading commit data...
sources Loading commit data...
testutils Loading commit data...
version Loading commit data...
withdrawals Loading commit data...
.gitignore Loading commit data...
Dockerfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
service.go Loading commit data...