MCPcopy Create free account
hub / github.com/ShareDropio/sharedrop / _onPeerDCOutgoingConnectionError

Function _onPeerDCOutgoingConnectionError

app/controllers/index.js:149–166  ·  view source on GitHub ↗
(event, data)

Source from the content-addressed store, hash-verified

147 },
148
149 _onPeerDCOutgoingConnectionError(event, data) {
150 const { connection, error } = data;
151 const peers = this.model;
152 const peer = peers.findBy('peer.id', connection.peer);
153
154 switch (error.type) {
155 case 'failed':
156 peer.setProperties({
157 'peer.connection': null,
158 'peer.state': 'disconnected',
159 state: 'error',
160 errorCode: 'connection-failed',
161 });
162 break;
163 default:
164 break;
165 }
166 },
167
168 _onPeerP2PDisconnected(event, data) {
169 const { connection } = data;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected