Merge pull request #1303 from IanCao/master

close stream safety & format code
This commit is contained in:
Fury Zhu 2019-06-04 16:12:03 +08:00 committed by GitHub
commit 403e9b830a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,13 +93,9 @@ public class PushService {
try { try {
udpSocket = new DatagramSocket(); udpSocket = new DatagramSocket();
Receiver receiver; Receiver receiver = new Receiver();
Thread inThread; Thread inThread = new Thread(receiver);
receiver = new Receiver();
inThread = new Thread(receiver);
inThread.setDaemon(true); inThread.setDaemon(true);
inThread.setName("com.alibaba.nacos.naming.push.receiver"); inThread.setName("com.alibaba.nacos.naming.push.receiver");
inThread.start(); inThread.start();