mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04:00
Prevent the capnproto connection from getting garbage collected.
This commit is contained in:
parent
95680ef43a
commit
4d6ab3094c
1 changed files with 2 additions and 1 deletions
|
@ -28,10 +28,11 @@ if (isSandstorm && Meteor.isServer) {
|
|||
Capnp.importSystem('sandstorm/sandstorm-http-bridge.capnp').SandstormHttpBridge;
|
||||
|
||||
let httpBridge = null;
|
||||
let capnpConnection = null;
|
||||
|
||||
function getHttpBridge() {
|
||||
if (!httpBridge) {
|
||||
const capnpConnection = Capnp.connect('unix:/tmp/sandstorm-api');
|
||||
capnpConnection = Capnp.connect('unix:/tmp/sandstorm-api');
|
||||
httpBridge = capnpConnection.restore(null, SandstormHttpBridge);
|
||||
}
|
||||
return httpBridge;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue