Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#1147 closed defect (fixed)

ScriptSrtTransport executing both timeout and connect functions at the same time

Reported by: Alejandro Molina R. (alejomc at gmail dot com) Owned by: James Burke
Priority: high Milestone:
Component: IO Version: 0.3
Keywords: Cc:
Blocked By: Blocking:


when using ScriptSrtTransport??, in DSR mode, and there is a timeout, and the defined function for the timeout is invoked but hasnt finished execution, and at that precise time the script from the server arrives, both events would execute at the same time ( the timeout and the connect ).

looking at the code

this._finish(currentState, "load"); doneCount++; delete this._state[param];

it calls finish first, and then erases the state, allowing this race condition to happen, i tried changing the code like this:

delete this._state[param]; this._finish(currentState, "load"); doneCount++;

and it seems to work, but im not sure if i would be introducing a bug.

Change History (3)

comment:1 Changed 16 years ago by James Burke

Milestone: 0.4
Owner: changed from alex to James Burke

comment:2 Changed 16 years ago by James Burke

Resolution: fixed
Status: newclosed

Fixed in [5589], used a different fix than the one proposed in the bug report. Please let me know if you see any issues.

comment:3 Changed 15 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.