Closed jacoscaz closed 4 years ago
For now the abortAll function has been updated to make sure it will always stop all connections (in the develop branch, so will have to be added to the other branches too). This is still not a completely clean solution as abortAll was intended as a hackish way to quickly disable the system (for the browser client).
So the safest solution would probably be to catch the errors when closing in the afterEach and creating a new client in the beforeEach.
For anyone interested, the stoppable
module (https://github.com/hunterloftis/stoppable) tracks the state of http connections and allows to shut down a server as soon as possible - keep-alive connections included - while still allowing in-flight requests to go through. Nifty module!
This project has now been deprecated in favor of Comunica, where this should not be a problem anymore. If it is, feel free to open a new issue there.
Possibly related to #38.
I have a Mocha suite in which I'm trying to tear down and re-create a
ldf-client
(and aldf-server
) usingbeforeEach()
/afterEach()
. However, I can't seem to find a way to force the client to close its connections..abortAll()
does not seem to work. The moment theldf-server
destroys the connection,ECONNREFUSED
comes up. Any tips?EDIT: branch is
feature-qpf-latest