Fix: success callback was called when timeout

This commit is contained in:
Takafumi Arakaki 2012-06-12 19:48:18 +02:00
parent 936f652369
commit d32f7e5a75

View file

@ -183,10 +183,11 @@ is killed immediately after the execution of this function.
(funcall parser)) (funcall parser))
(kill-buffer buffer)))) (kill-buffer buffer))))
(ein:log 'debug "data = %s" data) (ein:log 'debug "data = %s" data)
(ein:log 'debug "timeout = %s" timeout)
(ein:log 'debug "Executing success/error callback.") (ein:log 'debug "Executing success/error callback.")
(apply #'ein:safe-funcall-packed (apply #'ein:safe-funcall-packed
(append (if (plist-get status :error) (append (if (or (plist-get status :error) timeout)
(list error :symbol-status (list error :symbol-status
(if timeout 'timeout 'error)) (if timeout 'timeout 'error))
(list success)) (list success))