blob: 8e862d468feb0d44a1f3b6984af7552bc0cb5d43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
[[!comment format=mdwn
username="http://joeyh.name/"
ip="209.250.56.176"
subject="comment 7"
date="2014-05-30T20:47:02Z"
content="""
I wrote a test program to try to connect to this server, using a test account, and dump some events. This works on linux. Then I tried it on mac, and I think I have reproduced the same failure!
<pre>
oberon:~ joeyh$ ./xmpp
xmpp: <socket: 3>: hGetBuf: resource vanished (Connection reset by peer)
</pre>
Note that this exception is unable to be caught, it seems. Which would explain why the whole git-annex assistant crashes.
Also, the same program, when modified to use some other xmpp server, does not crash.
At this point, I think I need to forward this bug to network-protocol-xmpp author John Millikin. Which I've now done.
My advice for the bug submitter: git-annex is going to be deprecating XMPP in the not too distant future anyway. If you have your own server, a much nicer way to use git-annex is to install it on the server and use ssh remotes. Recent versions do not need xmpp to sync between clients in such a configuration.
Test program:
[[!format haskell \"\"\"
{-# LANGUAGE OverloadedStrings #-}
import Network.Protocol.XMPP
import Data.Maybe
import Data.Either
import Network
import Control.Monad
import Control.Monad.IO.Class
import Control.Exception
main = do
catch test
(\e -> do
let err = show (e :: IOException)
print (\"caught: \", err)
return (Right ())
)
print \"clean exit\"
test :: IO (Either Error ())
test = runClient server (getjid jid) username password $ do
liftIO $ print \"connected to server\"
jid <- bindJID (getjid jid)
liftIO $ print (\"bound to jid\", jid)
forever $ do
s <- getStanza
liftIO $ print (\"got\", s)
where
getjid t = fromMaybe (error \"jid parse error\") (parseJID t)
server = Server
(getjid serverjid)
servername
(PortNumber port)
servername = \"jabber.de\"
serverjid = \"jabber.de\"
port = 5222
jid = \"haskellxmpptest@jabber.de\"
username = \"haskellxmpptest\"
password = \"stupidpassword\"
\"\"\"]]
"""]]
|