Skip to content

Synchronizes responses Map on Android #16

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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