Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same code working on MAC but not working on windows #192

Closed
feranf opened this issue Oct 15, 2015 · 3 comments
Closed

Same code working on MAC but not working on windows #192

feranf opened this issue Oct 15, 2015 · 3 comments

Comments

@feranf
Copy link

feranf commented Oct 15, 2015

Hi,
I'm running the following code in MAC - works OK.
When running it on windows 7 - the following error occurs..

function color() {
  this.add( 'color:red', function(args,done){
    done(null, {hex:'#FF0000'});
  })
}


var seneca = require('seneca')


seneca()
  .use(color)
  .listen({type:'tcp'})

seneca()
  .client({type:'tcp'})
  .act('color:red')

// node readme-color-tcp.js --seneca.log=plugin:transport,level:INFO --seneca.log=type:act,regex:color:red
  • same for http transport
  • firewall was disabled...

The Error:
2015-10-15T09:14:46.808Z s3fx6o3a4jgi/1444900486776/7384/- DEBUG act remote$ IN m9bqsfq0d1ms/mj7vu98io1jj
{color:red} ENTRY CLIENT - - -
2015-10-15T09:14:57.946Z s3fx6o3a4jgi/1444900486776/7384/- ERROR act remote$ OUT - 11135 {color:r
ed} ENTRY CLIENT - seneca: Action failed: [TIMEOUT]. act_execute {id:m9bqsfq0d1ms/mj7vu98io1jj,gate:false
,ungate:false,desc:,plugin:{name:remote$,tag:null},time:{start:14449004 Error: [TIMEOUT]
at null._onTimeout (C:\seneca\node_modules\seneca\node_modules\gate-executor\gate-executor.js:95:
21)
at Timer.listOnTimeout as ontimeout

Thanks,

@feranf feranf closed this as completed Oct 15, 2015
@feranf
Copy link
Author

feranf commented Oct 15, 2015

Discussed in senecajs/senecajs.org#73

@GlenTiki
Copy link
Member

Okay, this works:

function color() {
  this.add( 'color:red', function(args,done){
    done(null, {hex:'#FF0000'});
  })
}


var seneca = require('seneca');

seneca()
  .use(color)
  .listen({type:'tcp'}) //become a server

seneca()
  .client({type:'tcp', host:"localhost"}) //become a client
  .act('color:red', console.log)

@mcdonnelldean
Copy link
Contributor

@thekemkid can you jump back over to the original issue senecajs/senecajs.org#73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants