本记得删除了。幸好有 服务器备份,招起来挺麻烦的。
236 wait_resp_mon(Node, Mref, Timeout) -> 237 receive 238 {Mref, Reply} -> 239 erlang:demonitor(Mref, [flush]), 240 {ok, Reply}; 241 {'DOWN', Mref, _, _, noconnection} -> 242 exit({nodedown, Node}); 243 {'DOWN', Mref, _, _, Reason} -> 244 exit(Reason) 245 after Timeout -> 246 erlang:demonitor(Mref), 247 receive 248 {'DOWN', Mref, _, _, _} -> true 249 after 0 -> true 250 end, 251 exit(timeoutmon) 252 end. 253 254 wait_resp(Node, Tag, Timeout) -> 255 receive 256 {Tag, Reply} -> 257 monitor_node(Node, false), 258 {ok, Reply}; 259 {nodedown, Node} -> 260 monitor_node(Node, false), 261 exit({nodedown, Node}) 262 after Timeout -> 263 monitor_node(Node, false), 264 exit(timeoutresp) 265 end. 266 267 %% 268 %% Send a reply to the client. 269 %%