Skip to content

DDCometClient fails to send messages because of the uninitialized local variable on iOS5. #2

Description

@koe6601sr

On a iOS5 simulator, the DDCometClient fails to send messages.
The issue is because of uninitialized local variable on the source "DDCometLongPollingTransport.m".
In the method main, there is a local variable "isPolling" which is expected to be initialized as YES, but is not initialized any value.
In out environments, the variable "isPolling" is initialized as YES on iOS4 simulator, but is initialized as NO on iOS5 simulator.
According to the specification of Objective-C, a value of an uninitialized local variable is not undefined.
We should to set initial value explicitly.
In this code, the "isPolling" should be initialized as YES.

We have checked it to be correct.

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