HttpSession.rejectSession() server crash

Hi. I am creating a new Module that should authenticate a client based on querystring. This is part of the code that I am using

public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) {
        getLogger().info("onHTTPSessionCreate: " + httpSession.getSessionId());
Boolean canView = canViewerView(httpSession.getQueryStr());
if (canView==false) {
        httpSession.rejectSession();
        httpSession.shutdown();
}
}

If the clients are not allowed to connect and they try to reconnect in a loop the number of connection counts on the Wowza Streaming Engine (4.7.8) increase as well as the Wowza heap to 100% until the server crashes.

So everyone who would like to crash my server could build an app to do this with very litlle resource.

In server error log I see multiple entries like this

HTTPStreamerAdapterCupertinoStreamer.onPlaylist[livevideo/stream/playlist.m3u8?key=7a4e38b]: Session not accepted[922997399]

It appears from that error @Marinko Zubac, that the file either becomes unreadable, is not available, or there is something additional that is preventing playback after time. You’ll need to submit a support ticket (don’t see one yet) so we can see if there is an issue with your custom module.

https://www.wowza.com/support/open-ticket