mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
socketchannel is an independent mod now, channel:request will throw channel.error when disconnected.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
local bson = require "bson"
|
||||
local socket = require "socket"
|
||||
local socketchannel = require "socketchannel"
|
||||
local skynet = require "skynet"
|
||||
local driver = require "mongo.driver"
|
||||
local rawget = rawget
|
||||
@@ -78,7 +79,7 @@ end
|
||||
function mongo.client( obj )
|
||||
obj.port = obj.port or 27017
|
||||
obj.__id = 0
|
||||
obj.__sock = socket.channel {
|
||||
obj.__sock = socketchannel.channel {
|
||||
host = obj.host,
|
||||
port = obj.port,
|
||||
response = dispatch_reply,
|
||||
@@ -285,4 +286,4 @@ function mongo_cursor:close()
|
||||
end
|
||||
end
|
||||
|
||||
return mongo
|
||||
return mongo
|
||||
|
||||
Reference in New Issue
Block a user