File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -962,9 +962,14 @@ function cleanNotes() {
962
962
let locationToNowAndNextEvents = { } ;
963
963
let iCalendar = { } ;
964
964
async function updateCalendarFromRemote ( ) {
965
- iCalendar = await ical . async . fromURL (
966
- `https://www.recurse.com/calendar/events.ics?token=${ recurseCalendarToken } &omit_cancelled_events=1&scope=all` ,
967
- ) ;
965
+ try {
966
+ iCalendar = await ical . async . fromURL (
967
+ `https://www.recurse.com/calendar/events.ics?token=${ recurseCalendarToken } &omit_cancelled_events=1&scope=all` ,
968
+ ) ;
969
+ } catch ( error ) {
970
+ console . error ( "Failed to fetch calendar ICS, will try again. Error:" ) ;
971
+ console . error ( error ) ;
972
+ }
968
973
clearTimeout ( timeoutIdForUpdateRoomsAsCalendarEventsChangeOverTime ) ;
969
974
updateRoomsAsCalendarEventsChangeOverTime ( ) ;
970
975
@@ -1038,6 +1043,8 @@ function updateRoomsAsCalendarEventsChangeOverTime() {
1038
1043
emitter . emit ( "room-change" , "events" , "changed for" , roomName ) ;
1039
1044
} ) ;
1040
1045
1046
+ // This isn't necessary right now, but possible source of a confusing bug
1047
+ clearTimeout ( timeoutIdForUpdateRoomsAsCalendarEventsChangeOverTime ) ;
1041
1048
timeoutIdForUpdateRoomsAsCalendarEventsChangeOverTime = setTimeout (
1042
1049
updateRoomsAsCalendarEventsChangeOverTime ,
1043
1050
calendarUpdateDelay ,
You can’t perform that action at this time.
0 commit comments