Skip to content

Question(investigate): isnt shutdownGracefully() sync() required? #2

@oxplay2

Description

@oxplay2

Hello,

i noticed that for example Server have sync only for channel(tcp/udp) close:

            tcpConGroup.shutdownGracefully();
            tcpMsgGroup.shutdownGracefully();
            tcpFuture.channel().closeFuture().sync();
            udpConGroup.shutdownGracefully();
            udpMsgGroup.shutdownGracefully();
            ((UdpServerChannel) udpFuture.channel()).doClose();

isnt this needed to wait until groups will shutdown first? like:

            tcpConGroup.shutdownGracefully().sync();
            tcpMsgGroup.shutdownGracefully().sync();
            tcpFuture.channel().closeFuture().sync();
            udpConGroup.shutdownGracefully().sync();
            udpMsgGroup.shutdownGracefully().sync();
            ((UdpServerChannel) udpFuture.channel()).doClose();

Also i know its netty specific, but i try understand what exactly "cfg.setConnectTimeoutMillis" refer to.
it say:

Sets the connect timeout of the channel in milliseconds. If the Channel does not support connect operation, this property is not used at all, and therefore will be ignored.

I have noticed that NettyClient will try reconnect if there are issues, but didnt noticed this timeout when server is off, so i guess its when server is on, but is unable to establish channel connection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions