/** * Destroy the poller. */ @Override public void destroy() { // Close any socket remaining in the add queue addCount = 0; for (int i = (addS.size() - 1); i >= 0; i--) { SendfileData data = addS.get(i); destroySocket(data.socket); } addS.clear(); // Close all sockets still in the poller int rv = Poll.pollset(sendfilePollset, desc); if (rv > 0) { for (int n = 0; n < rv; n++) { destroySocket(desc[n*2+1]); } } Pool.destroy(pool); sendfileData.clear(); try { while (this.isAlive()) { this.interrupt(); this.join(1000); } } catch (InterruptedException e) { // Ignore } }
/** * Destroy the poller. */ @Override public void destroy() { // Close any socket remaining in the add queue addCount = 0; for (int i = (addS.size() - 1); i >= 0; i--) { SendfileData data = addS.get(i); destroySocket(data.socket); } addS.clear(); // Close all sockets still in the poller int rv = Poll.pollset(sendfilePollset, desc); if (rv > 0) { for (int n = 0; n < rv; n++) { destroySocket(desc[n*2+1]); } } Pool.destroy(pool); sendfileData.clear(); try { while (this.isAlive()) { this.interrupt(); this.join(1000); } } catch (InterruptedException e) { // Ignore } }
/** * Destroy the poller. */ public void destroy() { // Close any socket remaining in the add queue addCount = 0; for (int i = (addS.size() - 1); i >= 0; i--) { SendfileData data = addS.get(i); destroySocket(data.socket); } addS.clear(); // Close all sockets still in the poller int rv = Poll.pollset(sendfilePollset, desc); if (rv > 0) { for (int n = 0; n < rv; n++) { destroySocket(desc[n*2+1]); } } Pool.destroy(pool); sendfileData.clear(); try { while (this.isAlive()) { this.interrupt(); this.join(1000); } } catch (InterruptedException e) { // Ignore } }
/** * Destroy the poller. */ @Override public void destroy() { // Close any socket remaining in the add queue addCount = 0; for (int i = (addS.size() - 1); i >= 0; i--) { SendfileData data = addS.get(i); destroySocket(data.socket); } addS.clear(); // Close all sockets still in the poller int rv = Poll.pollset(sendfilePollset, desc); if (rv > 0) { for (int n = 0; n < rv; n++) { destroySocket(desc[n*2+1]); } } Pool.destroy(pool); sendfileData.clear(); try { while (this.isAlive()) { this.interrupt(); this.join(1000); } } catch (InterruptedException e) { // Ignore } }