View | Details | Raw Unified | Return to bug 43653
Collapse All | Expand All

(-)java/org/apache/tomcat/util/net/NioBlockingSelector.java (-4 lines)
Lines 47-56 Link Here
47
        boolean timedout = false;
47
        boolean timedout = false;
48
        int keycount = 1; //assume we can write
48
        int keycount = 1; //assume we can write
49
        long time = System.currentTimeMillis(); //start the timeout timer
49
        long time = System.currentTimeMillis(); //start the timeout timer
50
        if (socket.getBufHandler().getWriteBuffer() != buf) {
51
            socket.getBufHandler().getWriteBuffer().put(buf);
52
            buf = socket.getBufHandler().getWriteBuffer();
53
        }
54
        try {
50
        try {
55
            while ( (!timedout) && buf.hasRemaining()) {
51
            while ( (!timedout) && buf.hasRemaining()) {
56
                if (keycount > 0) { //only write if we were registered for a write
52
                if (keycount > 0) { //only write if we were registered for a write
(-)java/org/apache/tomcat/util/net/NioSelectorPool.java (-4 lines)
Lines 139-148 Link Here
139
        boolean timedout = false;
139
        boolean timedout = false;
140
        int keycount = 1; //assume we can write
140
        int keycount = 1; //assume we can write
141
        long time = System.currentTimeMillis(); //start the timeout timer
141
        long time = System.currentTimeMillis(); //start the timeout timer
142
        if ( socket.getBufHandler().getWriteBuffer()!= buf ) {
143
            socket.getBufHandler().getWriteBuffer().put(buf);
144
            buf = socket.getBufHandler().getWriteBuffer();
145
        }
146
        try {
142
        try {
147
            while ( (!timedout) && buf.hasRemaining() ) {
143
            while ( (!timedout) && buf.hasRemaining() ) {
148
                int cnt = 0;
144
                int cnt = 0;

Return to bug 43653