function newHandle(type) {
if (type == 'udp4') {
- var handle = new UDP();
+ const handle = new UDP();
handle.lookup = lookup4;
return handle;
}
if (type == 'udp6') {
- var handle = new UDP();
+ const handle = new UDP();
handle.lookup = lookup6;
handle.bind = handle.bind6;
handle.send = handle.send6;
if (!self._handle)
return; // handle has been closed in the mean time
- var err = self._handle.bind(ip, port || 0, flags);
+ const err = self._handle.bind(ip, port || 0, flags);
if (err) {
var ex = exceptionWithHostPort(err, 'bind', ip, port);
self.emit('error', ex);