File Transfer (SOCKS5) using XMPPFramework

Hi,

ejabberd 15.04 is running at Amazon AWS.
I have a problem with file transfer through a proxy.
mod_proxy65 is enabled and works as expected with third-party clients.
But when I try to send a file using XMPPFramework I get the following in Logs:

2015-06-23 09:00:20.675 [debug] <0.31490.0>@ejabberd_c2s:send_text:1899 Send XML on stream = <<"<iq from='to@subdomain.amazonaws.com/app' to='from@subdomain.amazonaws.com/app' type='result' id='77ED9BED-42DF-4BDA-83B2-3583CB8CF039'><query xmlns='http://jabber.org/protocol/bytestreams' sid='CB886139-08DB-47A8-95A4-11A9F2D409E7'><streamhost-used jid='proxy.subdomain.amazonaws.com'/></query></iq>">>
2015-06-23 09:00:21.230 [debug] <0.31489.0>@ejabberd_receiver:process_data:349 Received XML on stream = <<"<iq type=\"set\" to=\"proxy.subdomain.amazonaws.com\" id=\"E6E96B1B-AA92-4CF4-AD19-11EE2CBC19ED\"><query xmlns=\"http://jabber.org/protocol/bytestreams\" sid=\"CB886139-08DB-47A8-95A4-11A9F2D409E7\"><activate>to@subdomain.amazonaws.com/app</activate></query></iq>">>
2015-06-23 09:00:21.231 [info] <0.30028.0>@mod_proxy65_stream:activate:126 (<0.31492.0>:<0.31491.0>) Activated bytestream for from@subdomain.amazonaws.com/app -> to@subdomain.amazonaws.com/app
2015-06-23 09:00:21.231 [debug] <0.31490.0>@ejabberd_c2s:send_text:1899 Send XML on stream = <<"<iq from='proxy.subdomain.amazonaws.com' to='from@subdomain.amazonaws.com/app' id='E6E96B1B-AA92-4CF4-AD19-11EE2CBC19ED' type='result'/>">>
2015-06-23 09:00:21.415 [debug] <0.31493.0>@shaper:update:117 State: {maxrate,50000,0.0,1435050021231079}, Size=1348
M=13.48, I=184.741
2015-06-23 09:00:21.435 [debug] <0.31493.0>@shaper:update:117 State: {maxrate,50000,3646.4166112130015,1435050021415918}, Size=1348
M=13.990138743058637, I=19.635
...
...
2015-06-23 09:00:25.671 [debug] <0.31493.0>@shaper:update:117 State: {maxrate,50000,40788.687861521874,1435050025653698}, Size=1348
M=22.76592008039643, I=17.966
2015-06-23 09:00:25.681 [info] <0.31491.0>@mod_proxy65_stream:terminate:105 Bytestream terminated
2015-06-23 09:00:25.681 [info] <0.31492.0>@mod_proxy65_stream:terminate:105 Bytestream terminated

Client application (sender) is reporting:

2015-06-23 11:57:23:033 App[19372:807] File transfer failed: Error Domain=NSPOSIXErrorDomain Code=32 "Broken pipe" UserInfo=0x168db8e0 {NSLocalizedFailureReason=Error in write() function, NSLocalizedDescription=Broken pipe}

stack trace:
[XMPPOutgoingFileTransfer sendData: named: toRecipient: description: transferId: error:] ->
[XMPPOutgoingFileTransfer startFileTransfer] ->
...
[GCDAsyncSocket writeData:withTimeout: tag:] ->
[GCDAsyncSocket maybeDequeueWrite] ->
[GCDAsyncSocket doWriteData] ->

[GCDAsyncSocket closeWithError:] "Broken pipe" "Error in write() function" ->
[XMPPOutgoingFileTransfer socketDidDisconnect: withError:]  ->
[XMPPOutgoingFileTransfer failWithReason: error:] "Socket disconnected before transfer completion."

I'm stuck at this point. Please advise.

Adjusting of TIMEOUT_WRITE

Adjusting of TIMEOUT_WRITE and TIMEOUT_READ values in XMPPOutgoingFileTransfer.m and XMPPIncomingFileTransfer.m and bytesToWrite variable in GCDAsyncSocket.m has fixed an issue.

Can you please send me more

Can you please send me more details or edited file... I have the same problem there!

Syndicate content