Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function synReply(socket, code, reason, headers, cb) {
try {
if (socket._handle instanceof spdy.handle) {
var handle = socket._handle;
handle._stream.respond(code, headers, function (err) {
cb.call();
});
/*
// SPDY socket
if(socket._lock){
socket._lock(function() {
var socket = this;
stream.respond(code, headers, function (err) {});
this._spdyState.framer.replyFrame(
this._spdyState.id, code, reason, headers,
function (err, frame) {
socket.connection.write(frame);