Clon1998 / mobileraker

A Flutter mobile app for Klipper/Moonraker
Other
490 stars 56 forks source link

WebSocket closed after editing printer! #8

Closed Clon1998 closed 3 years ago

Clon1998 commented 3 years ago

After editing the current printer it seems like the WebSocket closes and the UI does not rebuild correctly to accommodate for PrinterSetting changes.


======== Exception caught by foundation library ====================================================
The following StateError was thrown while dispatching notifications for RefreshNotifier<RefreshStatus>:
Bad state: StreamSink is closed

When the exception was thrown, this was the stack: 
#0      _StreamSinkImpl.add (dart:_http/http_impl.dart:903:7)
#1      _WebSocketImpl.add (dart:_http/websocket_impl.dart:1223:11)
#2      DelegatingStreamSink.add (package:async/src/delegate/stream_sink.dart:35:11)
#3      WebSocketWrapper.send (package:mobileraker/WebSocket.dart:108:20)
#4      WebSocketWrapper.sendObject (package:mobileraker/WebSocket.dart:114:5)
...
The RefreshNotifier<RefreshStatus> sending notification was: RefreshNotifier<RefreshStatus>#450b4(RefreshStatus.refreshing)
====================================================================================================
Clon1998 commented 3 years ago

Fixed in 76d1691