randy3k / remote-atom

rmate for atom
https://atom.io/packages/remote-atom
MIT License
85 stars 16 forks source link

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

Closed yanicklandry closed 9 years ago

yanicklandry commented 9 years ago

I believe this happens when the SSH connection has been disconnected.

Uncaught Error: This socket has been ended by the other party

**Atom Version**: 0.157.0
**System**: Mac OS X 10.10.2
**Thrown From**: [remote-atom](https://github.com/randy3k/remote-atom) package, v1.1.9

Steps To Reproduce

  1. Connect to SSH
  2. Open remote file (rmate )
  3. Close SSH connection
  4. Error happens in Atom

    Stack Trace

At events.js:85

Error: This socket has been ended by the other party
  at Socket.writeAfterFIN [as write] (net.js:274:12)
  at Session.send (/Users/yanick/.atom/packages/remote-atom/lib/remote-atom.coffee:84:17)
  at Session.close (/Users/yanick/.atom/packages/remote-atom/lib/remote-atom.coffee:102:10)
  at /Users/yanick/.atom/packages/remote-atom/lib/remote-atom.coffee:81:18
  at TextBuffer.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:118:15)
  at TextBuffer.module.exports.TextBuffer.destroy (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1050:21)
  at TextBuffer.module.exports.TextBuffer.release (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1074:14)
  at TextEditor.module.exports.TextEditor.destroyed (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:260:19)
  at TextEditor.module.exports.Model.destroy (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:218:14)
  at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:445:18)
  at Pane.module.exports.Pane.destroyActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:422:12)
  at Workspace.module.exports.Workspace.destroyActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:604:35)
  at Workspace.module.exports.Workspace.destroyActivePaneItemOrEmptyPane (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:643:21)
  at atom-workspace.atom.commands.add.core:close (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:284:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:167:20)

/cc @atom/core

randy3k commented 9 years ago

It is expected since the connection is lost. It may be better to add an error handler when it happens.

pnosko commented 9 years ago

It might be expected, but the problem is that this prevents the tab with the remote file open from being closed properly. A restart of atom is needed. It isn't just an error message the users are free to ignore, it actually breaks the tab.

randy3k commented 9 years ago

It should be handled now.

pnosko commented 9 years ago

I can confirm it is fixed, thank you.