Skip to content

socket关闭时程序异常退出。 #16

@Reasno

Description

@Reasno

https://github.com/longyan/phpkafka/blob/213d2bf9becb1f59dbdad28037078e909a62076b/src/Socket/SwooleSocket.php#L132

当swoole socket关闭时,接收协程会在这一行抛出异常,导致致命错误。由于接收协程不受用户控制,用户无法捕获此异常进行任何修复。

建议修改为此处返回空字符串或false,在主协程抛出异常,以便用户捕获,进行重连或优雅终止。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions