Pieter Noordhuis
8cb4d52cd2
Run pending callbacks with a NULL reply on redisAsyncFree()
2010-12-28 20:49:18 +01:00
Pieter Noordhuis
29ea901b24
Fix the async free() and disconnect() functions
...
To make sure that these functions can also be called from functions
other than command callbacks, the flag IN_CALLBACK is introduced that
holds whether the context is currently executing a callback. If so,
redisAsyncFree() and redisAsyncDisconnect() should delegate their task
to the reply processor to avoid segfaults.
2010-12-28 20:29:29 +01:00
Pieter Noordhuis
c882a3621a
Only check REDIS_FREEING when a callback was executed
2010-12-28 19:35:26 +01:00
Pieter Noordhuis
e3776bfaa6
Add function to explicitly free an async context
2010-12-28 19:19:25 +01:00
Pieter Noordhuis
3d76f3fe02
Add write event after setting connect callback
2010-12-28 17:59:26 +01:00
Pieter Noordhuis
a1e2c6dfed
Add myself to license in some files
2010-12-16 22:08:46 +01:00
Pieter Noordhuis
12725f88ed
Fire onConnect callback on the first write event
2010-12-07 10:22:30 +01:00
Pieter Noordhuis
af7369a253
Use extra field for adapter-specific data
...
This makes sure that the "data" field on the asynchronous context can be
used for user-specific data.
2010-12-01 16:43:24 +01:00
Pieter Noordhuis
09a0fe626f
Explicitly initialize struct fields to NULL
2010-11-15 21:53:22 +01:00
Pieter Noordhuis
f25a5267cc
Allow to connect using a unix socket from hiredis
2010-11-03 11:38:26 +01:00
Pieter Noordhuis
ffa8666a64
Change error reporting to have an explicit type
...
When there is an I/O error, errno should be used to find out what is
wrong. In other cases, errno cannot be used. So, use an explicit type in
Hiredis to define the different error scenarios that can occur.
2010-11-02 16:36:38 +01:00
Pieter Noordhuis
30a9f8f271
Use existing function to append to the output buffer
2010-11-01 14:16:01 +01:00
Pieter Noordhuis
ac13c9f095
Only copy relevant fields from callback ptr to avoid copying garbage
2010-11-01 10:13:05 +01:00
Pieter Noordhuis
a66ec18e80
Make push/shift functions for callbacks responsible for malloc/free
2010-11-01 10:10:03 +01:00
Pieter Noordhuis
e25db30f38
Run pending callbacks with NULL reply on error
2010-11-01 10:01:34 +01:00
Pieter Noordhuis
8b0fddcb02
Clarify redisAsyncDisconnect behavior in comments
2010-11-01 09:53:54 +01:00
Pieter Noordhuis
ad2456047e
Process callbacks after reading
2010-11-01 09:53:34 +01:00
Pieter Noordhuis
c43256633c
Cleanup function should remove read/write events
2010-11-01 09:53:18 +01:00
Pieter Noordhuis
437eea80fc
Make error ptr accessible from async context
2010-11-01 09:52:17 +01:00
Pieter Noordhuis
4e3bd7893d
Add support to lazily disconnect an asynchronous connection
2010-11-01 09:27:43 +01:00
Pieter Noordhuis
0152f12807
Extracted code to support callbacks in an asynchronous context
2010-10-31 21:20:47 +01:00