From dd8ee44d65280092863beb276496a3f6fef4edcf Mon Sep 17 00:00:00 2001 From: IanCao Date: Fri, 31 May 2019 16:14:58 +0800 Subject: [PATCH] fix --- .../java/com/alibaba/nacos/naming/push/PushService.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java b/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java index 56e9ba347..e052af559 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java @@ -93,13 +93,9 @@ public class PushService { try { udpSocket = new DatagramSocket(); - Receiver receiver; + Receiver receiver = new Receiver(); - Thread inThread; - - receiver = new Receiver(); - - inThread = new Thread(receiver); + Thread inThread = new Thread(receiver); inThread.setDaemon(true); inThread.setName("com.alibaba.nacos.naming.push.receiver"); inThread.start();