1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00
ssh-key-action/node_modules/defer-to-connect/index.js
2019-09-18 20:39:54 +09:00

9 lines
177 B
JavaScript

'use strict';
module.exports = (socket, callback) => {
if (socket.writable && !socket.connecting) {
callback();
} else {
socket.once('connect', callback);
}
};