mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
call a jsonrpc function in segfault example
This commit is contained in:
@@ -1,11 +1,22 @@
|
|||||||
const {default:dc} = require("./dist")
|
const { default: dc } = require('./dist')
|
||||||
|
|
||||||
const ac = new dc("testdtrdtrh")
|
const ac = new dc('test123456')
|
||||||
|
|
||||||
ac.startJSONRPCHandler(console.log)
|
ac.startJSONRPCHandler(console.log)
|
||||||
|
|
||||||
setTimeout(()=>{
|
console.log(
|
||||||
ac.close() // This segfaults -> TODO Findout why?
|
ac.jsonRPCRequest(
|
||||||
|
JSON.stringify({
|
||||||
|
jsonrpc: '2.0',
|
||||||
|
method: 'get_all_account_ids',
|
||||||
|
params: [],
|
||||||
|
id: 2,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
console.log("still living")
|
setTimeout(() => {
|
||||||
|
ac.close() // This segfaults -> TODO Findout why?
|
||||||
|
|
||||||
|
console.log('still living')
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|||||||
Reference in New Issue
Block a user