Skip to content

Request timeout doesn't give any response #27

@mingfai

Description

@mingfai

apparently, when request timeout is set, the request only close the subscription without notify the caller. Should the Request provide a way to add/set a OnCloseListener/Handler?

//NatsImpl.java
@Override
    public Request request(final String subject, String message, long timeout, TimeUnit unit, final Integer maxReplies, MessageHandler... messageHandlers) {
        //...
        final ScheduledExecutorService scheduler = (channel == null) ? eventLoopGroup.next() : channel.eventLoop();
        scheduler.schedule(new Runnable() {
            @Override
            public void run() {
                subscription.close();
            }
        }, timeout, unit);
// ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions