Nixed premature optimization wherein a frequent premature optimizer, who we
will not name, was trying to allow certain authentications to proceed directly on the authenticator thread instead of making a round trip through the invoker. This resulted in those authentications trying to post their results from the authenticator thread, which is bad because all downstream messages should be posted from the distributed object thread. The only authentications that would "benefit" from this optimization were peer authentications of which there would be extremely few (currently one in our largest installation) compared to the hundreds of thousands of normal authentications, which have to make the invoker thread round trip as a matter of course. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4655 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -36,8 +36,8 @@ import com.threerings.presents.server.net.AuthingConnection;
|
||||
import static com.threerings.presents.Log.log;
|
||||
|
||||
/**
|
||||
* A simple server that does nothing more than spit out a canned error
|
||||
* response to everyone who logs in.
|
||||
* A simple server that does nothing more than spit out a canned error response to everyone who
|
||||
* logs in.
|
||||
*/
|
||||
public class Rejector extends PresentsServer
|
||||
{
|
||||
@@ -80,20 +80,12 @@ public class Rejector extends PresentsServer
|
||||
}
|
||||
|
||||
/**
|
||||
* An authenticator implementation that refuses all authentication
|
||||
* requests.
|
||||
* An authenticator implementation that refuses all authentication requests.
|
||||
*/
|
||||
protected class RejectingAuthenticator extends Authenticator
|
||||
{
|
||||
@Override
|
||||
protected Invoker getInvoker ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// from abstract Authenticator
|
||||
protected void processAuthentication (
|
||||
AuthingConnection conn, AuthResponse rsp)
|
||||
protected void processAuthentication (AuthingConnection conn, AuthResponse rsp)
|
||||
throws PersistenceException
|
||||
{
|
||||
log.info("Rejecting request: " + conn.getAuthRequest());
|
||||
|
||||
Reference in New Issue
Block a user