My VOD interface allows the user to move a file to another directory. In order to do this, it signals Wowza to close all references to the stream so the underlying file can be moved. This works correctly on my Windows 7 development machine, but does not work on the Server 2008 production machine. On the Server 2008 install, the player gets notified of the error correctly, but Wowza keeps a handle open to the file, preventing the file move from working. Both installs are 4.1.0 with identical configuration except for the StorageDirs.
Do I need to do something else to get Wowza to relinquish its file handle?
Relevant module code:
public void endWithError(IMediaStream stream, String code, String desc) {
sendStreamOnStatusError(stream, code, desc);
Timer t = new Timer();
t.schedule(new StreamKiller(stream), 500);
}
class StreamKiller extends TimerTask {
private final IMediaStream stream;
StreamKiller (IMediaStream stream) {
this.stream = stream;
}
public void run() {
stream.getClient().rejectConnection();
stream.getClient().shutdownClient();
}
}
// the matched streams are terminated like so:
streamModule.endWithError(stream, "NetStream.Play.StreamNotFound", "Video was moved or renamed");