mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-01-25 14:42:47 +00:00
Merge pull request #335 from qq312384485/master
修复与socket.io c++ client通信失败的问题
This commit is contained in:
commit
651167dddb
@ -123,8 +123,13 @@ export default class extends Base {
|
||||
url = `/${url}`;
|
||||
}
|
||||
request.url = url;
|
||||
|
||||
let http = await think.http(request, think.extend({}, request.res));
|
||||
let http;
|
||||
//socket.io c++ client发过来的requet没有res
|
||||
if(!request.res){
|
||||
http = await think.http(url);
|
||||
}else{
|
||||
http = await think.http(request, think.extend({}, request.res));
|
||||
}
|
||||
http.data = data;
|
||||
http.socket = socket;
|
||||
http.io = this.io;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user