dev #78
@ -21,6 +21,7 @@ import org.jboss.logging.Logger;
|
|||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.time.Duration;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static fr.titionfire.ffsaf.net2.Client_Thread.MAPPER;
|
import static fr.titionfire.ffsaf.net2.Client_Thread.MAPPER;
|
||||||
@ -166,6 +167,7 @@ public class CompetitionWS {
|
|||||||
return Uni.createFrom().item(makeError(message, "Permission denied")).toMulti();
|
return Uni.createFrom().item(makeError(message, "Permission denied")).toMulti();
|
||||||
return ((Uni<?>) method.invoke(entry.getValue(), connection,
|
return ((Uni<?>) method.invoke(entry.getValue(), connection,
|
||||||
MAPPER.treeToValue(message.data(), method.getParameterTypes()[1])))
|
MAPPER.treeToValue(message.data(), method.getParameterTypes()[1])))
|
||||||
|
.ifNoItem().after(Duration.ofSeconds(5)).fail()
|
||||||
.map(o -> makeReply(message, o))
|
.map(o -> makeReply(message, o))
|
||||||
.onFailure()
|
.onFailure()
|
||||||
.recoverWithItem(t -> {
|
.recoverWithItem(t -> {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user