Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2f0414a

Browse files
fix: use ElectronConnectionHandler to connect ide updater services (#2697)
1 parent e3319da commit 2f0414a

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

‎arduino-ide-extension/src/electron-main/arduino-electron-main-module.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ConnectionHandler } from '@theia/core/lib/common/messaging/handler';
2-
import { JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory';
1+
import { ElectronConnectionHandler } from '@theia/core/lib/electron-main/messaging/electron-connection-handler';
2+
import { RpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory';
33
import { ElectronMainWindowService } from '@theia/core/lib/electron-common/electron-main-window-service';
44
import { TheiaMainApi } from '@theia/core/lib/electron-main/electron-api-main';
55
import {
@@ -33,18 +33,15 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
3333
bind(IDEUpdaterImpl).toSelf().inSingletonScope();
3434
bind(IDEUpdater).toService(IDEUpdaterImpl);
3535
bind(ElectronMainApplicationContribution).toService(IDEUpdater);
36-
bind(ConnectionHandler)
36+
bind(ElectronConnectionHandler)
3737
.toDynamicValue(
3838
(context) =>
39-
new JsonRpcConnectionHandler<IDEUpdaterClient>(
40-
IDEUpdaterPath,
41-
(client) => {
42-
const server = context.container.get<IDEUpdater>(IDEUpdater);
43-
server.setClient(client);
44-
client.onDidCloseConnection(() => server.disconnectClient(client));
45-
return server;
46-
}
47-
)
39+
new RpcConnectionHandler<IDEUpdaterClient>(IDEUpdaterPath, (client) => {
40+
const server = context.container.get<IDEUpdater>(IDEUpdater);
41+
server.setClient(client);
42+
client.onDidCloseConnection(() => server.disconnectClient(client));
43+
return server;
44+
})
4845
)
4946
.inSingletonScope();
5047

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /