Removed unnecessary flush() commands
This commit is contained in:
parent
bf681688d0
commit
73de927bd5
|
@ -294,8 +294,7 @@ class RmiBridge {
|
|||
|
||||
// System.err.println("Sending: " + invokeMethod.responseID);
|
||||
connection.send()
|
||||
.TCP(invokeMethodResult)
|
||||
.flush();
|
||||
.TCP(invokeMethodResult);
|
||||
|
||||
// logger.error("{} sent data: {} with id ({})", connection, result, invokeMethod.responseID);
|
||||
}
|
||||
|
|
|
@ -149,8 +149,7 @@ class RmiObjectLocalHandler extends RmiObjectHandler {
|
|||
Class<?> rmiImpl = serialization.getRmiImpl(registration.interfaceClass);
|
||||
|
||||
RmiRegistration registrationResult = connection.createNewRmiObject(interfaceClass, rmiImpl, callbackId);
|
||||
connection.TCP(registrationResult)
|
||||
.flush();
|
||||
connection.TCP(registrationResult);
|
||||
}
|
||||
|
||||
// Check if we are getting an already existing REMOTE object. This check is always AFTER the check to create a new object
|
||||
|
@ -160,8 +159,7 @@ class RmiObjectLocalHandler extends RmiObjectHandler {
|
|||
// GET a LOCAL rmi object, if none get a specific, GLOBAL rmi object (objects that are not bound to a single connection).
|
||||
RmiRegistration registrationResult = connection.getExistingRmiObject(interfaceClass, registration.rmiId, callbackId);
|
||||
|
||||
connection.TCP(registrationResult)
|
||||
.flush();
|
||||
connection.TCP(registrationResult);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -56,8 +56,7 @@ class RmiObjectNetworkHandler extends RmiObjectHandler {
|
|||
|
||||
// For network connections, the interface class kryo ID == implementation class kryo ID, so they switch automatically.
|
||||
RmiRegistration registrationResult = connection.createNewRmiObject(interfaceClass, interfaceClass, callbackId);
|
||||
connection.TCP(registrationResult)
|
||||
.flush();
|
||||
connection.TCP(registrationResult);
|
||||
}
|
||||
|
||||
// Check if we are getting an already existing REMOTE object. This check is always AFTER the check to create a new object
|
||||
|
@ -66,8 +65,7 @@ class RmiObjectNetworkHandler extends RmiObjectHandler {
|
|||
//
|
||||
// GET a LOCAL rmi object, if none get a specific, GLOBAL rmi object (objects that are not bound to a single connection).
|
||||
RmiRegistration registrationResult = connection.getExistingRmiObject(interfaceClass, registration.rmiId, callbackId);
|
||||
connection.TCP(registrationResult)
|
||||
.flush();
|
||||
connection.TCP(registrationResult);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -46,11 +46,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import dorkbox.network.connection.Connection;
|
||||
import dorkbox.network.connection.ConnectionImpl;
|
||||
import dorkbox.network.connection.EndPoint;
|
||||
import dorkbox.network.connection.KryoExtra;
|
||||
import dorkbox.network.connection.Listener;
|
||||
import dorkbox.network.connection.*;
|
||||
import dorkbox.network.serialization.RmiSerializationManager;
|
||||
|
||||
/**
|
||||
|
@ -279,14 +275,10 @@ class RmiProxyHandler implements InvocationHandler {
|
|||
|
||||
// Sends our invokeMethod to the remote connection, which the RmiBridge listens for
|
||||
if (this.udp) {
|
||||
this.connection.send()
|
||||
.UDP(invokeMethod)
|
||||
.flush();
|
||||
this.connection.UDP(invokeMethod);
|
||||
}
|
||||
else {
|
||||
this.connection.send()
|
||||
.TCP(invokeMethod)
|
||||
.flush();
|
||||
this.connection.TCP(invokeMethod);
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user