提交 b09a2a60 编写于 作者: S Stephen Connolly

It would be better if we had an explicit method to identify when code is run...

It would be better if we had an explicit method to identify when code is run in a thread on the master vs in a thread on a slave

 - because forcing the slave to load the Jenkins class into its classloader is probably not a good plan
上级 84bc8eca
......@@ -835,7 +835,7 @@ public class SlaveComputer extends Computer {
* @since 1.362
*/
public static VirtualChannel getChannelToMaster() {
if (Jenkins.getInstanceOrNull()!=null)
if (Jenkins.getInstanceOrNull()!=null) // check if calling thread is on master or on slave
return FilePath.localChannel;
// if this method is called from within the slave computation thread, this should work
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册