Skip to content

websocket 无法在onopen 取 isReconnect #615

Open
@baidwwy

Description

@baidwwy

查看源码,发现在onConnection之后就进行了reset
而ws是在onMessage才触发onopen

libhv/evpp/TcpClient.h

Lines 134 to 145 in b7928e9

channel->onconnect = [this]() {
if (unpack_setting) {
channel->setUnpack(unpack_setting);
}
channel->startRead();
if (onConnection) {
onConnection(channel);
}
if (reconn_setting) {
reconn_setting_reset(reconn_setting);
}
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions