Skip to content

Commit

Permalink
Fix unix transport
Browse files Browse the repository at this point in the history
  • Loading branch information
gartens committed Apr 3, 2024
1 parent cb624ab commit 21fe730
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ private void acceptLoop( ServerSocketChannel server, ClientManager clientManager
while ( true ) {
try {
SocketChannel s = server.accept();
s.socket().setTcpNoDelay( true );
long connectionId = ID_COUNTER.getAndIncrement();
Thread t = new Thread( () -> acceptConnection( s, name, connectionId, createTransport, clientManager ), String.format( "ProtoInterface" + name + "ClientConnection%d", connectionId ) );
t.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.io.EOFException;
import java.io.IOException;
import java.net.StandardSocketOptions;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.SocketChannel;
Expand Down Expand Up @@ -98,6 +99,7 @@ public void close() {

public static Transport accept( SocketChannel con ) {
try {
con.setOption( StandardSocketOptions.TCP_NODELAY, true );
return new PlainTransport( con );
} catch ( IOException e ) {
throw new GenericRuntimeException( e );
Expand Down

0 comments on commit 21fe730

Please sign in to comment.