mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

matthew_swift
25.05.2009 bdb54bc45ce05fcb01e106a8e9b52db188579efd
opends/src/server/org/opends/server/extensions/SASLByteChannel.java
@@ -31,10 +31,8 @@
import java.security.cert.Certificate;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
import javax.security.sasl.Sasl;
import org.opends.server.api.ClientConnection;
import org.opends.server.util.StaticUtils;
/**
 * This class implements a SASL byte channel that can be used during
@@ -310,14 +308,7 @@
     *         to the socket channel, or, {@code false} if not.
     */
    private int writeChannel(ByteBuffer buffer) throws IOException {
        int bytesWritten = channel.write(buffer);
        if (bytesWritten < 0)
            throw new ClosedChannelException();
        else if (bytesWritten == 0) {
            if(!StaticUtils.writeWithTimeout(connection, buffer))
                throw new ClosedChannelException();
        }
        return bytesWritten;
        return channel.write(buffer);
      }
    /**