| Description: |
::websocket::test creates Client variable to communicate request values to ::websocket::upgrade. Only the latter unsets this temporary variable. Failing to invoke ::websocket::upgrade, creates a memory leak as requests come in.
In my opinion if there is no reason to invoke ::websocket::test without later upgrading, both should be merged in a single procedure. Otherwise no temporary variables should be created.
|
| User Comments: |
emmanuel added on 2014-08-12 13:25:08:
I have an actual usecase for separating the test and upgrade in a server implementation. However, I think that you are right. One solution would be to document the variable created and change the calling/return interface: websocket::test would return fullyqualified name of the variable as an identification of success, otherwise an empty string. It would be up to the caller to remove (unset) the variable if no upgrade is to be performed.
What do you think?
|