Wowza 3.6.4; in a 3-tier configuration:

1. An origin server with an incoming RTMP stream
2. An edge server
3. A CDN

Server #2 pulls the stream from #1 using a custom module and MediaCaster, then uses Push Publishing to relay the stream to the CDN. When the signal into #1 is interrupted, server #2 notifies the breach, and is programmed to shut down (1) the Push Publisher, and (2) the Media Caster. I see the following processes in the log (in specified order):

- PushPublisher.disconnect
- PushPublisher.sessionClosed
- LiveMediaStreamReceiver.shutdown
- PushPublisher.sessionClosed
- LiveMediaStreamReceiver.disconnect
- unpublish stream
- destroy stream
- LiveMediaStreamReceiver.sessionClosed
- LiveMediaStreamReceiver.sessionClosed[applicationname/_definst_/streamname]: reconnect: isCurrentSession:false tryConnect:false

Right after that, there's a NullPointerException as follows
LiveMediaStreamReceiver.doWatchdog[applicationname/_definst_/streamname]: java.lang.NullPointerException: java.lang.NullPointerException|at com.wowza.wms.mediacaster.wowza.LiveMediaStreamReceiver.doWatchdogInternal(|at com.wowza.wms.mediacaster.wowza.LiveMediaStreamReceiver.doWatchdog(|at com.wowza.wms.mediacaster.MediaCasterStreamItem.doWatchdog(|at com.wowza.wms.mediacaster.MediaCasterStreamMap.doWatchdog(|	-	-	-	838.697	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
	at com.wowza.wms.mediacaster.wowza.LiveMediaStreamReceiver.doWatchdogInternal(
	at com.wowza.wms.mediacaster.wowza.LiveMediaStreamReceiver.doWatchdog(
	at com.wowza.wms.mediacaster.MediaCasterStreamItem.doWatchdog(
	at com.wowza.wms.mediacaster.MediaCasterStreamMap.doWatchdog(
	at com.wowza.wms.application.ApplicationInstance.doWatchdog(
	at com.wowza.wms.application.Application.doWatchdog(
	at com.wowza.wms.vhost.VHost.d(
	at com.wowza.wms.vhost.VHost.doWatchdog(
Now I know that since there's a custom module controlling the Push Publisher and the MediaCaster, there's probably something in there that causes this. But I have not the faintest idea why the WatchDog is still trying to access the stream after it has been destroyed. Since the LiveStreamReceived reports disconnected and session closed, I expected the WatchDog no longer to check on this.

Can anyone give me a hint as why this may occur?