Skip to content

client.StationInfo returns os.ErrNotExist if there are no clients connected #20

@0x5a17ed

Description

@0x5a17ed

As of efdf3f4 the current implementation of client.StationInfo returns the error os.ErrNotExist if there are no clients connected to the interface even when the given interface runs in Access Point mode.

This is a weird behavior since it complicates the handling of errors returned from client.StationInfo with an additional check if the given error is os.ErrNotExist. Returning an empty array here would simplify things. Relevant koan: http://thecodelesscode.com/case/6.

Would love to hear your opinion about this @mdlayher!

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