When I use okhttp to achieve WebSocket connection, when received onClosing (WebSocket webSocket, int code, String reason) callback, whether the call must be manually () method to close the resources?
See the source code found that if the client is passive disconnect, do not manually call the close () method will lead to onClosed (WebSocket webSocket, int code, String reason) method can not callback, the resources can not be recycled. The actual situation is indeed the case Happening.
If it is necessary, should it be emphasized in the document or comment?
When I use okhttp to achieve WebSocket connection, when received onClosing (WebSocket webSocket, int code, String reason) callback, whether the call must be manually () method to close the resources?
See the source code found that if the client is passive disconnect, do not manually call the close () method will lead to onClosed (WebSocket webSocket, int code, String reason) method can not callback, the resources can not be recycled. The actual situation is indeed the case Happening.
If it is necessary, should it be emphasized in the document or comment?