[ISSUE #3850] ignore socket exception when client destroy already (#3906)

* if client destroy already, ignore socket exception.

* remove the exception's judgement

* remove unuseful import
This commit is contained in:
赵延 2020-09-30 13:14:42 +08:00 committed by GitHub
parent 787ea47cfe
commit f6c6a9f3b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,6 +107,9 @@ public class PushReceiver implements Runnable, Closeable {
udpSocket.send(new DatagramPacket(ack.getBytes(UTF_8), ack.getBytes(UTF_8).length,
packet.getSocketAddress()));
} catch (Exception e) {
if (closed) {
return;
}
NAMING_LOGGER.error("[NA] error while receiving push data", e);
}
}