# HttpSession.rejectSession() server crash

**URL:** <https://community.wowza.com/t/httpsession-rejectsession-server-crash/55170>\
**Category:** Wowza Streaming Engine\
**Created:** [May 14, 2020, 2:16pm UTC](https://community.wowza.com/t/httpsession-rejectsession-server-crash/55170 "2020-05-14T14:16:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marinko\_Zubac](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@Marinko\_Zubac](https://community.wowza.com/u/Marinko_Zubac)\
**Post date:** [May 14, 2020, 2:16pm UTC](https://community.wowza.com/t/httpsession-rejectsession-server-crash/55170/1 "2020-05-14T14:16:10Z")

</div>

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

```auto
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]

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [May 18, 2020, 4:01pm UTC](https://community.wowza.com/t/httpsession-rejectsession-server-crash/55170/2 "2020-05-18T16:01:18Z")

</div>

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](https://www.wowza.com/support/open-ticket)
