Skip to content

Warning: feof(): 60 is not a valid stream resource in .. /src/Socket/Connection.php on line 18 #4

Closed
@webzak

Description

@webzak

When data are short after reading with stream_socket_recvfrom() stream type changes from 'stream' to 'Unknown' and feof($stream) generates warning.

The possible fix is to add check of type before feof()

if ('' === $data || false === $data || get_resource_type($stream) == 'Unknown' || feof($stream))

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