if(!is_running) { if(log.isWarnEnabled()) log.warn("Connection is not running, discarding message"); return; }
       void send(byte[] data, int offset, int length) {           if(use_send_queues) {               try {                   // we need to copy the byte[] buffer here because the original buffer might get changed meanwhile                   byte[] tmp=new byte[length];                   System.arraycopy(data, offset, tmp, 0, length);                   send_queue.add(tmp);                   if(!sender.isRunning())                       sender.start();               }               catch(QueueClosedException e) {                   log.error("failed adding message to send_queue", e);               }           }           else               _send(data, offset, length);       }