pipelineWrite

This commit is contained in:
redkale
2024-10-27 11:38:17 +08:00
parent 8f257761fd
commit f3f84bd5b3
2 changed files with 6 additions and 1 deletions

View File

@@ -169,10 +169,13 @@ abstract class AsyncNioConnection extends AsyncConnection {
pipelineLock.unlock();
}
}
boolean empty = this.pipelineWriteQueue.isEmpty();
for (PipelinePacket packet : packets) {
this.pipelineWriteQueue.offer(packet);
}
this.ioWriteThread.execute(this::pipelineDoWrite);
if (empty) {
this.ioWriteThread.execute(this::pipelineDoWrite);
}
}
private void pipelineDoWrite() {

View File

@@ -9,6 +9,7 @@ import java.io.Serializable;
import java.net.InetSocketAddress;
import java.util.Collection;
import org.redkale.convert.ConvertColumn;
import org.redkale.convert.ConvertImpl;
import org.redkale.convert.json.JsonConvert;
/**
@@ -16,6 +17,7 @@ import org.redkale.convert.json.JsonConvert;
*
* @author zhangjx
*/
@ConvertImpl(value = WebSocketUserAddress.SimpleWebSocketUserAddress.class)
public interface WebSocketUserAddress {
Serializable userid();