mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-02 15:08:33 +00:00
feat: no ping timeout in dev mode
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
@@ -109,6 +109,8 @@ import {
|
||||
} from '../common/protocol/survey-service';
|
||||
import { IsTempSketch } from './is-temp-sketch';
|
||||
import { rebindNsfwFileSystemWatcher } from './theia/filesystem/nsfw-watcher/nsfw-bindings';
|
||||
import { MessagingContribution } from './theia/core/messaging-contribution';
|
||||
import { MessagingService } from '@theia/core/lib/node/messaging/messaging-service';
|
||||
|
||||
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
bind(BackendApplication).toSelf().inSingletonScope();
|
||||
@@ -379,6 +381,9 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
.inSingletonScope();
|
||||
|
||||
bind(IsTempSketch).toSelf().inSingletonScope();
|
||||
rebind(MessagingService.Identifier)
|
||||
.to(MessagingContribution)
|
||||
.inSingletonScope();
|
||||
});
|
||||
|
||||
function bindChildLogger(bind: interfaces.Bind, name: string): void {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { MessagingContribution as TheiaMessagingContribution } from '@theia/core/lib/node/messaging/messaging-contribution';
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
@injectable()
|
||||
export class MessagingContribution extends TheiaMessagingContribution {
|
||||
// https://github.com/eclipse-theia/theia/discussions/11543
|
||||
protected override checkAliveTimeout = process.argv.includes(
|
||||
'--no-ping-timeout'
|
||||
)
|
||||
? 24 * 60 * 60 * 1_000 // one day
|
||||
: 30_000;
|
||||
}
|
||||
Reference in New Issue
Block a user