MakeWebrequest don't fire the callback method

Hi forum,

My data field uses MakeWebRequest from Background to fetch data every five minutes. I have noticed some issues with it when using it in areas with very poor mobile coverage. When the mobile connection "comes and goes" it sometimes get stuck waiting for the MakeWebRequest to call the callback function. I have very limited debug capabilities unfortunatley but I can read from the debug log that the background temporal event is called, then i make a call to MakeWebrequest and waits for the "readResponse" function to start execute (readResponse is my callback function). However, according to the debug prints, onReceive never executes.

I checked the YML log file and cannot see any indications that the data field crashed on me (that was my initial thought). 

here are some lines of source code so you can follow the flow:

in the AppBase, 

function getInitialView() {
       // some code here...
       
    	if (Toybox.System has :ServiceDelegate) {
        	if (_lastEvent != null) {
        	m_nextEvent = _lastEvent.add(FIVE_MINS);
        	
    	} else {
    		m_nextEvent = Time.now();
    	}
        	
        	Background.registerForTemporalEvent(m_nextEvent);
    	}
    	else {
    		Sys.println("Background not availabe");
    	}
    	
    	// some more code here...
    }
    
function getServiceDelegate(){
    	m_inBackground=true;
        
        if (!System.getDeviceSettings().phoneConnected) {
        	m_nextEvent = Time.now().add(FIVE_MINS);
			Background.registerForTemporalEvent(m_nextEvent);
        } else {
        	return [new dfBg()];
        }
    }
 

In my background class:

function onTemporalEvent() {

    // some code here
    
    Comms.makeWebRequest(_readURL, {}, options, new Lang.Method(self, :readResponse));
}

function readResponse(responseCode, data) {
    	
    	if (responseCode == 200) {
    	
    		Background.exit(data);
    			
   		} else {
    		// do some error handling here
    	}
}	

And finally the data is passed to the main process to the onBackgroundData method in the app base:

function onBackgroundData(data) {
	
		// do lots of stuff with data here...
		
		m_nextEvent = Time.now().add(FIVE_MINS);
		Background.registerForTemporalEvent(m_nextEvent);

	}

Since I pass a Moment and not a Duration to the registerForTemporalEvent, the background process will not start again if I don't receive any data to onBackgroundData. I may need to reconsider this design. The reason i use it is to be able to start the background process as quickly as possible when the data field is started, and I also want to show the user how many minutes remining until the first data can be displayed. (otherwise it may idle for up to 5 minutes and users may think something is wrong). When writing this question it appears clear to me that I need to reconsider dropping this "feature" and opt for stability. 

If I pass a Duration to registerTemporalEvent instead of a Moment, would the background process fire again even though the previous event is still waiting for the makewebrequest callback? If so, that would certainly solve my problem I think. 

TIA

/Fredrik