src/java.base/share/classes/sun/nio/ch/UnixDomainSocketChannelImpl.java
branchunixdomainchannels
changeset 59123 ddb8977e44da
parent 59090 fb91b01624be
equal deleted inserted replaced
59111:31b8ffbfe1b9 59123:ddb8977e44da
   171                         throw new ConnectionPendingException();
   171                         throw new ConnectionPendingException();
   172                     if (localAddress != null)
   172                     if (localAddress != null)
   173                         throw new AlreadyBoundException();
   173                         throw new AlreadyBoundException();
   174                     UnixDomainSocketAddress usa = Net.checkUnixAddress(local);
   174                     UnixDomainSocketAddress usa = Net.checkUnixAddress(local);
   175                     Net.unixDomainBind(fd, usa);
   175                     Net.unixDomainBind(fd, usa);
   176                     localAddress = Net.localUnixAddress(fd);
   176                     if (usa == null) {
       
   177                         localAddress = Net.UNNAMED;
       
   178                     } else {
       
   179                         localAddress = Net.localUnixAddress(fd);
       
   180                     }
   177                 }
   181                 }
   178             } finally {
   182             } finally {
   179                 writeLock.unlock();
   183                 writeLock.unlock();
   180             }
   184             }
   181         } finally {
   185         } finally {