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

(-)java/org/apache/tomcat/util/net/NioEndpoint.java (-5 lines)
Lines 888-894 Link Here
888
                    // Setup the file channel
888
                    // Setup the file channel
889
                    File f = new File(sd.fileName);
889
                    File f = new File(sd.fileName);
890
                    if (!f.exists()) {
890
                    if (!f.exists()) {
891
                        cancelledKey(sk);
892
                        return SendfileState.ERROR;
891
                        return SendfileState.ERROR;
893
                    }
892
                    }
894
                    @SuppressWarnings("resource") // Closed when channel is closed
893
                    @SuppressWarnings("resource") // Closed when channel is closed
Lines 962-969 Link Here
962
                if (log.isDebugEnabled()) log.debug("Unable to complete sendfile request:", x);
961
                if (log.isDebugEnabled()) log.debug("Unable to complete sendfile request:", x);
963
                if (!calledByProcessor && sc != null) {
962
                if (!calledByProcessor && sc != null) {
964
                    close(sc, sk);
963
                    close(sc, sk);
965
                } else {
966
                    cancelledKey(sk);
967
                }
964
                }
968
                return SendfileState.ERROR;
965
                return SendfileState.ERROR;
969
            } catch (Throwable t) {
966
            } catch (Throwable t) {
Lines 970-977 Link Here
970
                log.error("", t);
967
                log.error("", t);
971
                if (!calledByProcessor && sc != null) {
968
                if (!calledByProcessor && sc != null) {
972
                    close(sc, sk);
969
                    close(sc, sk);
973
                } else {
974
                    cancelledKey(sk);
975
                }
970
                }
976
                return SendfileState.ERROR;
971
                return SendfileState.ERROR;
977
            }
972
            }

Return to bug 60409