Skip to content

Commit

Permalink
Wait for the verifying process to exit in order to avoid dead-lock.
Browse files Browse the repository at this point in the history
* twittering-mode.el (twittering-verify-credentials): wait for the
process to exit in order to avoid dead-lock.
  • Loading branch information
cvmat committed Jun 28, 2010
1 parent 978f6b5 commit 9e832e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Expand Up @@ -10,6 +10,9 @@
in order to avoid dead-lock.
(twittering-get-list-index-sync): likewise.

* twittering-mode.el (twittering-verify-credentials): wait for the
process to exit in order to avoid dead-lock.

2010-06-13 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el (twittering-write-and-encrypt): fix arguments
Expand Down
13 changes: 11 additions & 2 deletions twittering-mode.el
Expand Up @@ -3114,10 +3114,19 @@ authorized -- The account has been authorized.")
'verify-credentials
`((sentinel
. twittering-http-get-verify-credentials-sentinel)))))
(unless proc
(cond
((null proc)
(setq twittering-account-authorization nil)
(message "Authorization failed. Type M-x twit to retry.")
(setq twittering-oauth-access-token-alist nil))))
(setq twittering-oauth-access-token-alist nil))
(t
(while (and (eq twittering-account-authorization 'queried)
(memq (process-status proc) '(run connect open)))
(sit-for 0.1))
(when (eq twittering-account-authorization 'queried)
(message "Authorization failed. Type M-x twit to retry.")
(setq twittering-oauth-access-token-alist nil)
(setq twittering-account-authorization nil))))))
(t
(message "Failed to load an authorized token from \"%s\"."
twittering-private-info-file)
Expand Down

0 comments on commit 9e832e9

Please sign in to comment.