Commit fea27e15df7c15d6b3c469619d0075c352ec2131
1 parent
1dec42ff
Exists in
master
and in
1 other branch
Exception callback no reachable
Showing
1 changed file
with
12 additions
and
9 deletions
Show diff stats
endpoints/video.js
@@ -88,11 +88,12 @@ function init(req, res) { | @@ -88,11 +88,12 @@ function init(req, res) { | ||
88 | 88 | ||
89 | var requesting = http.request(options, function(res) { | 89 | var requesting = http.request(options, function(res) { |
90 | res.setEncoding('utf8'); | 90 | res.setEncoding('utf8'); |
91 | - res.on('error', function (e) { | ||
92 | - console.log("The callback URL isn't reachable"); | ||
93 | - }); | ||
94 | }); | 91 | }); |
95 | 92 | ||
93 | + requesting.on('error', function (e) { | ||
94 | + console.log("The callback URL isn't reachable"); | ||
95 | + }); | ||
96 | + | ||
96 | requesting.write(data); | 97 | requesting.write(data); |
97 | requesting.end(); | 98 | requesting.end(); |
98 | 99 | ||
@@ -118,11 +119,12 @@ function init(req, res) { | @@ -118,11 +119,12 @@ function init(req, res) { | ||
118 | 119 | ||
119 | var requesting = http.request(options, function(res) { | 120 | var requesting = http.request(options, function(res) { |
120 | res.setEncoding('utf8'); | 121 | res.setEncoding('utf8'); |
121 | - res.on('error', function (e) { | ||
122 | - console.log("The callback URL isn't reachable"); | ||
123 | - }); | ||
124 | }); | 122 | }); |
125 | 123 | ||
124 | + requesting.on('error', function (e) { | ||
125 | + console.log("The callback URL isn't reachable"); | ||
126 | + }); | ||
127 | + | ||
126 | requesting.write(data); | 128 | requesting.write(data); |
127 | requesting.end(); | 129 | requesting.end(); |
128 | 130 | ||
@@ -148,11 +150,12 @@ function init(req, res) { | @@ -148,11 +150,12 @@ function init(req, res) { | ||
148 | 150 | ||
149 | var requesting = http.request(options, function(res) { | 151 | var requesting = http.request(options, function(res) { |
150 | res.setEncoding('utf8'); | 152 | res.setEncoding('utf8'); |
151 | - res.on('error', function (e) { | ||
152 | - console.log("The callback URL isn't reachable"); | ||
153 | - }); | ||
154 | }); | 153 | }); |
155 | 154 | ||
155 | + requesting.on('error', function (e) { | ||
156 | + console.log("The callback URL isn't reachable"); | ||
157 | + }); | ||
158 | + | ||
156 | requesting.write(data); | 159 | requesting.write(data); |
157 | requesting.end(); | 160 | requesting.end(); |
158 | 161 |