@@ -203,7 +203,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
203
203
204
204
// #endregion Theia customizations
205
205
206
- // Monitor client provider per connected frontend.
206
+ // Serial client provider per connected frontend.
207
207
bind ( ConnectionContainerModule ) . toConstantValue (
208
208
ConnectionContainerModule . create ( ( { bind, bindBackendService } ) => {
209
209
bind ( MonitorClientProvider ) . toSelf ( ) . inSingletonScope ( ) ;
@@ -260,17 +260,14 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
260
260
)
261
261
. inSingletonScope ( ) ;
262
262
263
- bind ( ArduinoFirmwareUploaderImpl ) . toSelf ( ) . inSingletonScope ( ) ;
264
- bind ( ArduinoFirmwareUploader ) . toService ( ArduinoFirmwareUploaderImpl ) ;
265
- bind ( BackendApplicationContribution ) . toService ( ArduinoFirmwareUploaderImpl ) ;
266
- bind ( ConnectionHandler )
267
- . toDynamicValue (
268
- ( context ) =>
269
- new JsonRpcConnectionHandler ( ArduinoFirmwareUploaderPath , ( ) =>
270
- context . container . get ( ArduinoFirmwareUploader )
271
- )
272
- )
273
- . inSingletonScope ( ) ;
263
+ // Singleton per BE, each FE connection gets its proxy.
264
+ bind ( ConnectionContainerModule ) . toConstantValue (
265
+ ConnectionContainerModule . create ( ( { bind, bindBackendService } ) => {
266
+ bind ( ArduinoFirmwareUploaderImpl ) . toSelf ( ) . inSingletonScope ( ) ;
267
+ bind ( ArduinoFirmwareUploader ) . toService ( ArduinoFirmwareUploaderImpl ) ;
268
+ bindBackendService ( ArduinoFirmwareUploaderPath , ArduinoFirmwareUploader ) ;
269
+ } )
270
+ ) ;
274
271
275
272
// Logger for the Arduino daemon
276
273
bind ( ILogger )
0 commit comments