This is an automated email from the ASF dual-hosted git repository.
jonyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new 4585ba816 [ISSUE #3092] Conditions are always 'true' is always 'true'
[OpenMessageTCPClient] (#3178)
4585ba816 is described below
commit 4585ba81638f8dd87472414d1441870cc85d0fcd
Author: Preet Angad Singh Nanda
<[email protected]>
AuthorDate: Fri Feb 17 18:50:41 2023 -0500
[ISSUE #3092] Conditions are always 'true' is always 'true'
[OpenMessageTCPClient] (#3178)
---
.../tcp/impl/openmessage/OpenMessageTCPClient.java | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git
a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/openmessage/OpenMessageTCPClient.java
b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/openmessage/OpenMessageTCPClient.java
index baf28d269..985c801a0 100644
---
a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/openmessage/OpenMessageTCPClient.java
+++
b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/openmessage/OpenMessageTCPClient.java
@@ -97,21 +97,16 @@ public class OpenMessageTCPClient implements
EventMeshTCPClient<Message> {
@Override
public void close() throws EventMeshException {
-
- if (this.eventMeshTCPPubClient != null) {
- try {
- this.eventMeshTCPPubClient.close();
- } catch (Exception e) {
- throw new EventMeshException(e);
- }
+ try {
+ this.eventMeshTCPPubClient.close();
+ } catch (Exception e) {
+ throw new EventMeshException(e);
}
- if (this.eventMeshTCPSubClient != null) {
- try {
- this.eventMeshTCPSubClient.close();
- } catch (Exception e) {
- throw new EventMeshException(e);
- }
+ try {
+ this.eventMeshTCPSubClient.close();
+ } catch (Exception e) {
+ throw new EventMeshException(e);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]