mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +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)
|
||||
|
||||
setTimeout(()=>{
|
||||
ac.close() // This segfaults -> TODO Findout why?
|
||||
console.log(
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user