Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-26585] Android: Catch all TCP socket read and write exceptions #10490

Merged
merged 6 commits into from
Dec 19, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public int readSync(Object bufferProxy, int offset, int length) throws IOExcepti
{
try {
return TiStreamHelper.read(clientSocket.getInputStream(), (BufferProxy) bufferProxy, offset, length);
} catch (IOException e) {
} catch (Exception e) {
e.printStackTrace();
String message = e.getMessage();
if (message == null) {
Expand Down Expand Up @@ -422,7 +422,7 @@ public int writeSync(Object buffer, int offset, int length) throws IOException
{
try {
return TiStreamHelper.write(clientSocket.getOutputStream(), (BufferProxy) buffer, offset, length);
} catch (IOException e) {
} catch (Exception e) {
e.printStackTrace();
String message = e.getMessage();
if (message == null) {
Expand Down Expand Up @@ -469,6 +469,17 @@ public void close() throws IOException
}
}

@Override
public void release()
{
try {
close();
} catch (Exception e) {
// do nothing...
}
super.release();
}

@Override
public String getApiName()
{
Expand Down