arunoda / meteor-streams

Realtime messaging for Meteor
http://arunoda.github.io/meteor-streams
MIT License
287 stars 97 forks source link

Error: This socket has been ended by the other party #19

Closed iMagdy closed 8 years ago

iMagdy commented 10 years ago

I've built a complex app with Meteor Streams for creating shared web IDE sessions, and running server languages (ex: Java) through this code editor by sending the code and then getting back the execution result from the server.

So inside the execution of the app (the one the user wrote in their IDE) I'm listening to a stream event to handle server side I/O apps in real-time, however, this works fine in the first run, but when re-running the app (using the same event), I get the error "Error: This socket has been ended by the other party" which is an exception and it stops the execution there.

Is there any ideas on this issue, why is it happening? and is there a way to re-connect to the stream/socket when it's ended or closed?

arunoda commented 10 years ago

Can I get some logs? Which helps me a lot.

On Saturday, February 8, 2014, Islam Magdy notifications@github.com wrote:

I've built a complex app with Meteor Streams for creating shared web IDE sessions, and running server languages (ex: Java) through this code editor by sending the code and then getting back the execution result from the server.

So inside the execution of the app (the one the user wrote in their IDE) I'm listening to a stream event to handle server side I/O apps in real-time, however, this works fine in the first run, but when re-running the app (using the same event), I get the error "Error: This socket has been ended by the other party" which is an exception and it stops the execution there.

Is there any ideas on this issue, why is it happening? and is there a way to re-connect to the stream/socket when it's ended or closed?

— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/meteor-streams/issues/19 .

Arunoda Susiripala

@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda

iMagdy commented 10 years ago

Sure:

I20140208-03:08:58.172(2)? Exception while invoking method 'stream-server-notifications' Error: This socket has been ended by the other party
I20140208-03:08:58.173(2)?     at Socket.writeAfterFIN [as write] (net.js:276:12)
I20140208-03:08:58.173(2)?     at Object. (packages/**required_app_package***/*****.js:245)
I20140208-03:08:58.173(2)?     at Object.emit (packages/streams/lib/ev.js:11)
I20140208-03:08:58.173(2)?     at packages/streams/lib/server.js:93
arunoda commented 10 years ago

Hmm. I will have a look at this.

On Saturday, February 8, 2014, Islam Magdy notifications@github.com wrote:

Sure:

I20140208-03:08:58.172(2)? Exception while invoking method 'stream-server-notifications' Error: This socket has been ended by the other party I20140208-03:08:58.173(2)? at Socket.writeAfterFIN as write I20140208-03:08:58.173(2)? at Object. (packages/KodeParse-CodeEngine/KodeParse_CodeEngine.js:245) I20140208-03:08:58.173(2)? at Object.emit (packages/streams/lib/ev.js:11) I20140208-03:08:58.173(2)? at packages/streams/lib/server.js:93

— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/meteor-streams/issues/19#issuecomment-34525366 .

Arunoda Susiripala

@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda

iMagdy commented 10 years ago

Thank you!

arunoda commented 10 years ago

hmm. I exactly can't figure out the issue. But I hope this is something wrong with the logic you've written in side the Stream.on() inside the server.

Is is possible to share the code with me for that part?

On Sat, Feb 8, 2014 at 8:03 AM, Islam Magdy notifications@github.comwrote:

Thank you!

— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/meteor-streams/issues/19#issuecomment-34526287 .

Arunoda Susiripala

@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda