Skip to content

Rare bug caused by concurrent map read and write #36

@alankm

Description

@alankm

From 'handler.go':

line 63
delete(connections, conn)

line 94
connections[conn] = true

All of this logic occurs within a 'http.Handler', and is therefore multi-threaded. There are currently no safeguards against concurrent map read and map write. Perhaps this map should be replaced with a 'sync.Map' from the standard library?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions