mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
modify error process in socket channel
This commit is contained in:
@@ -132,9 +132,12 @@ local function dispatch_by_order(self)
|
||||
else
|
||||
close_channel_socket(self)
|
||||
local errmsg
|
||||
if result ~= socket_error then
|
||||
if result_ok ~= socket_error then
|
||||
errmsg = result_ok
|
||||
end
|
||||
self.__result[co] = socket_error
|
||||
self.__result_data[co] = errmsg
|
||||
skynet.wakeup(co)
|
||||
wakeup_all(self, errmsg)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -79,11 +79,11 @@ skynet.start(function()
|
||||
|
||||
-- bad sql statement
|
||||
local ok, res = pcall( db.query, db, "select * from notexisttable" )
|
||||
print( dump(res) )
|
||||
print( "ok= ",ok, dump(res) )
|
||||
|
||||
res = db:query("select * from cats order by id asc")
|
||||
print ( dump( res ) )
|
||||
|
||||
|
||||
skynet.exit()
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user