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 | 88 | |
89 | 89 | var requesting = http.request(options, function(res) { |
90 | 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 | 97 | requesting.write(data); |
97 | 98 | requesting.end(); |
98 | 99 | |
... | ... | @@ -118,11 +119,12 @@ function init(req, res) { |
118 | 119 | |
119 | 120 | var requesting = http.request(options, function(res) { |
120 | 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 | 128 | requesting.write(data); |
127 | 129 | requesting.end(); |
128 | 130 | |
... | ... | @@ -148,11 +150,12 @@ function init(req, res) { |
148 | 150 | |
149 | 151 | var requesting = http.request(options, function(res) { |
150 | 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 | 159 | requesting.write(data); |
157 | 160 | requesting.end(); |
158 | 161 | ... | ... |