Closed andrey-vorobiev closed 3 years ago
Thanks. I think this should do it, perhaps add in a log line in there so we would see something if it goes wrong. I'll see if I can spot something else around the close state. This may have something to do with renegotiating the SSL. Do you have any tips on reproducing the issue?
Recently I have observed that jsip based service consumes 100% cpu when handling single WSS connection. This has been caused by continuous GC caused by DirectByteBuffer allocation. Switching log level to debug showed me the following:
So I looked into SSLStateMachine and noticed that CLOSED status is ignored which seems to be cause of infinite loop. So PR is here.
Still this fix solves problem described about I'm not sure if it valid at all, at least if checking for closed state should go before checking number of bytes produced. Also it worth while to check wrap logic.