criso / fbgraph

NodeJs module to access the facebook graph api
http://criso.github.io/fbgraph/
1.09k stars 176 forks source link

timeout option not working #8

Closed swapsmagic closed 11 years ago

swapsmagic commented 12 years ago

I tried passing the timeout option to the fbgraph object and looks like it is not being passed to the request object. And that makes the request not to timeout if the request takes more time that the set by setOptions parameter.

Found the reason looks like due to following line of code: https://github.com/criso/fbgraph/blob/master/lib/graph.js#L222 Where it is assumped that Graph object will get the same this as the current object, which is not true.

The solution for this is to passing options as parameter to Graph function.

criso commented 12 years ago

wow. Yeah, no clue what happened there. haha... that would never work.

swapsmagic commented 12 years ago

https://github.com/criso/fbgraph/pull/12 to fix the issue