Shanty | fix shanty connection teardown & JSON-RPC deadlock