Skip to content

Synchronizes responses Map on Android #16

@klehmann

Description

@klehmann

In the Server class (https://github.com/alwx/react-native-http-bridge/blob/master/android/src/main/java/me/alwx/HttpServer/Server.java#L30) you are using a HashMap to store the pending requests. Since HashMap is not Thread-safe, this class needs to be synchronized, e.g. by wrapping it in Collections.synchronizedMap(...), to avoid multi threading effects.

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